Esempio n. 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());
        }
Esempio n. 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());
        }
Esempio n. 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());
        }