예제 #1
0
        public static void TestEolianEinaValueInOwn()
        {
            test.Testing obj = new test.TestingConcrete();

            using (eina.Value v = new eina.Value(eina.ValueType.Int32)) {
                v.Set(2001);
                Test.AssertEquals(eina.ValueOwnership.Managed, v.Ownership);

                obj.SetValuePtrOwn(v);
                Test.AssertEquals(eina.ValueOwnership.Unmanaged, v.Ownership);

                eina.Value v_received = obj.GetValuePtr();
                Test.AssertEquals(eina.ValueOwnership.Unmanaged, v_received.Ownership);

                Test.AssertEquals(v, v_received);

                obj.ClearValue();
            }
        }