Ejemplo n.º 1
0
        private void TestInnerScope(CSharpB b)
        {
            var a = new CSharpAwithDestructor();

            a.SetName("rar");
            b.SetA(a);
        }
Ejemplo n.º 2
0
 public void TestInheritedFunctionCallFromCpp()
 {
     var a = new CSharpA();
     var b = new CSharpB();
     a.SetName( "bob" );
     a.SayHello();
     b.SetA( a );
     Assert.AreEqual(  "C++ Call A:C# Hell!", b.CallA() );
 }
Ejemplo n.º 3
0
        public void TestInheritedFunctionCallFromCpp()
        {
            var a = new CSharpA();
            var b = new CSharpB();

            a.SetName("bob");
            a.SayHello();
            b.SetA(a);
            Assert.AreEqual("C++ Call A:C# Hell!", b.CallA());
        }
Ejemplo n.º 4
0
        public void TestWithUsing()
        {
            using ( var a = new CSharpAwithDestructor() ) {
            using ( var b = new CSharpB() ) {
                    a.SetName( "rar" );
                    b.SetA( a );

                    Assert.AreEqual( "C++ Call A:C# Hell!", b.CallA() );
                }
            }
            ClearGC();
            Assert.AreEqual( CSharpAwithDestructor.State.Destroyed, CSharpAwithDestructor.LastState );
        }
Ejemplo n.º 5
0
        public void TestWithUsing()
        {
            using (var a = new CSharpAwithDestructor()) {
                using (var b = new CSharpB()) {
                    a.SetName("rar");
                    b.SetA(a);

                    Assert.AreEqual("C++ Call A:C# Hell!", b.CallA());
                }
            }
            ClearGC();
            Assert.AreEqual(CSharpAwithDestructor.State.Destroyed, CSharpAwithDestructor.LastState);
        }
Ejemplo n.º 6
0
 private void TestInnerScope(CSharpB b)
 {
     var a = new CSharpAwithDestructor();
     a.SetName( "rar" );
     b.SetA( a );
 }