private static void InterfaceDispatchTest() { StartTest("Struct interface test"); ItfStruct itfStruct = new ItfStruct(); EndTest(ItfCaller(itfStruct) == 4); ClassWithSealedVTable classWithSealedVTable = new ClassWithSealedVTable(); StartTest("Interface dispatch with sealed vtable test"); EndTest(CallItf(classWithSealedVTable) == 37); }
private static void InterfaceDispatchTest() { ItfStruct itfStruct = new ItfStruct(); if (ItfCaller(itfStruct) == 4) { PrintLine("Struct interface test: Ok."); } ClassWithSealedVTable classWithSealedVTable = new ClassWithSealedVTable(); PrintString("Interface dispatch with sealed vtable test: "); if (CallItf(classWithSealedVTable) == 37) { PrintLine("Ok."); } else { PrintLine("Failed."); } }