public void AddFunctionGetFunctionTest( ) { using (var context = new Context( )) using (var module = new BitcodeModule(context, TestModuleName)) { Function testFunc = CreateSimpleVoidNopTestFunction(module, "foo"); // verify basics Assert.IsNotNull(testFunc); Assert.AreSame(module, testFunc.ParentModule); Assert.AreEqual("foo", testFunc.Name); // Verify the function is in the module var funcFromModule = module.GetFunction("foo"); Assert.AreSame(testFunc, funcFromModule); } }