public static void TestEolianEinaValueOutByValue() { test.Testing obj = new test.TestingConcrete(); using (eina.Value v = new eina.Value(eina.ValueType.String)) { eina.Value v_out = null; v.Set("hello!"); obj.SetValue(v); obj.OutValue(out v_out); Test.AssertEquals(v, v_out); Test.AssertEquals(eina.ValueOwnership.Managed, v_out.Ownership); } }
public static void TestEolianEinaValueInReturnByValue() { test.Testing obj = new test.TestingConcrete(); using (eina.Value v = new eina.Value(eina.ValueType.Int32)) { v.Set(42); obj.SetValue(v); Test.AssertEquals(eina.ValueOwnership.Managed, v.Ownership); // Using get_value_ptr while get_value() is not supported. eina.Value v_received = obj.GetValuePtrOwn(); Test.AssertEquals(eina.ValueOwnership.Managed, v_received.Ownership); Test.AssertEquals(v, v_received); v_received.Dispose(); } }