Пример #1
0
        public static void TestEolianEinaValueInOwn()
        {
            test.ITesting obj = new test.Testing();

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

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

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

                Test.AssertEquals(v, v_received);

                obj.ClearValue();
            }
        }