Example #1
0
        public void NoArguments_1()
        {
            var native = new VkNativeInterface {
                Name = "vkCreateInstance", ReturnType = "void"
            };
            var func = new VkFunctionCall {
                Call = native
            };

            Assert.AreEqual("vkCreateInstance();", func.GetImplementation());
        }
Example #2
0
        public void NoArguments_3()
        {
            var native = new VkNativeInterface {
                Name = "vkCreateInstance", ReturnType = "int"
            };
            var func = new VkFunctionCall {
                Call = native, Variable = "result", IsNew = false
            };

            Assert.AreEqual("result = vkCreateInstance();", func.GetImplementation());
        }
Example #3
0
        public void OneArg_3()
        {
            var native = new VkNativeInterface {
                Name = "vkCreateInstance", ReturnType = "void"
            };
            var func = new VkFunctionCall {
                Call = native, Variable = "result", IsNew = false
            };

            func.Arguments.Add(new VkCallArgument {
                Source = new VkFunctionArgument {
                    Name = "pCount"
                }, IsNull = false
            });
            Assert.AreEqual(1, func.Arguments.Count);

            Assert.AreEqual("vkCreateInstance(pCount);", func.GetImplementation());
        }