コード例 #1
0
        public static void TestEolianEinaValueInReturn()
        {
            test.ITesting obj = new test.Testing();

            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();
            }
        }
コード例 #2
0
        public static void TestEolianEinaValueOutOwn()
        {
            test.ITesting obj = new test.Testing();

            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);
            }
        }