예제 #1
0
파일: ValueEolian.cs 프로젝트: AmarokPL/efl
        public static void TestEolianEinaValueOutOwn()
        {
            var obj = new Dummy.TestObject();

            using (Eina.Value v = new Eina.Value(Eina.ValueType.String)) {
                Eina.Value v_out = null;

                v.Set("hello!");
                obj.SetValuePtr(v);
                obj.OutValuePtrOwn(out v_out);

                Test.AssertEquals(v, v_out);
                Test.AssertEquals(Eina.Ownership.Managed, v_out.Ownership);
            }
        }
예제 #2
0
파일: ValueEolian.cs 프로젝트: AmarokPL/efl
        public static void TestEolianEinaValueInReturn()
        {
            var obj = new Dummy.TestObject();

            using (Eina.Value v = new Eina.Value(Eina.ValueType.Int32)) {
                v.Set(42);
                obj.SetValuePtr(v);
                Test.AssertEquals(Eina.Ownership.Managed, v.Ownership);

                Eina.Value v_received = obj.GetValuePtrOwn();
                Test.AssertEquals(Eina.Ownership.Managed, v_received.Ownership);
                Test.AssertEquals(v, v_received);
                v_received.Dispose();
            }
        }