예제 #1
0
        public static void basic_parent_managed_inherit()
        {
            test.ITesting parent = new Derived(null);
            test.ITesting child  = new Derived(parent);

            Test.AssertEquals(parent, child.GetParent());

            test.ITesting parent_from_cast = test.Testing.static_cast(child.GetParent());
            Test.AssertEquals(parent, parent_from_cast);
        }
예제 #2
0
파일: Parts.cs 프로젝트: sav/efl
        private static void do_part_test(test.ITesting t)
        {
            var p1 = t.Part1;
            var p2 = t.Part2;

            Test.Assert(p1 is test.Testing);
            Test.AssertEquals("part1", p1.GetName());
            Test.Assert(p2 is test.Testing);
            Test.AssertEquals("part2", p2.GetName());
        }
예제 #3
0
        public static void basic_parent()
        {
            test.ITesting parent = new test.Testing(null);
            test.ITesting child  = new test.Testing(parent);

            Test.AssertEquals(parent, child.GetParent());

            test.ITesting parent_retrieved = test.Testing.static_cast(child.GetParent());
            Test.AssertEquals(parent, parent_retrieved);
        }
예제 #4
0
 //
 // Test cases:
 //
 public static void return_same_object()
 {
     test.ITesting testing = new test.Testing();
     test.ITesting o1      = testing.ReturnObject();
     Test.Assert(o1.raw_handle != IntPtr.Zero);
     Test.Assert(o1.raw_handle == testing.raw_handle);
     test.ITesting o2 = o1.ReturnObject();
     Test.Assert(o2.raw_handle != IntPtr.Zero);
     Test.Assert(o2.raw_handle == o1.raw_handle);
 }
예제 #5
0
파일: Events.cs 프로젝트: sav/efl
        public static void event_with_object_payload()
        {
            test.ITesting obj          = new test.Testing();
            test.ITesting received_obj = null;

            obj.EvtWithObjEvt += (object sender, EvtWithObjEvt_Args e) => {
                received_obj = e.arg;
            };

            test.ITesting sent_obj = new test.Testing();

            obj.EmitEventWithObj(sent_obj);

            Test.AssertEquals(sent_obj, received_obj);
        }
예제 #6
0
 public Derived(test.ITesting parent = null) : base(parent)
 {
 }
예제 #7
0
 public Derived(test.ITesting parent = null,
                test.TestingInherit.ConstructingMethod cb = null) : base(parent, cb)
 {
 }