From 386d80cbc3ff7b6898ff0fc84e899e2e8339bdec Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrg=20Billeter?= Date: Mon, 15 Jun 2009 08:38:19 +0200 Subject: [PATCH] D-Bus: Test properties --- tests/dbus/basic-types.test | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/tests/dbus/basic-types.test b/tests/dbus/basic-types.test index 9f142e963..5ae27468e 100644 --- a/tests/dbus/basic-types.test +++ b/tests/dbus/basic-types.test @@ -4,8 +4,10 @@ Program: client [DBus (name = "org.example.Test")] interface Test : Object { - public abstract int test_int (int i, out int j); - public abstract string test_string (string s, out string t); + public abstract string test_property { owned get; set; } + + public abstract int test_int (int i, out int j); + public abstract string test_string (string s, out string t); } void main () { @@ -23,23 +25,29 @@ void main () { u = test.test_string ("hello", out t); assert (t == "world"); assert (u == "vala"); + + test.test_property = "hello"; + t = test.test_property; + assert (t == "hello"); } Program: server [DBus (name = "org.example.Test")] class Test : Object { - public int test_int (int i, out int j) { - assert (i == 42); - j = 23; - return 11; - } - - public string test_string (string s, out string t) { - assert (s == "hello"); - t = "world"; - return "vala"; - } + public string test_property { owned get; set; } + + public int test_int (int i, out int j) { + assert (i == 42); + j = 23; + return 11; + } + + public string test_string (string s, out string t) { + assert (s == "hello"); + t = "world"; + return "vala"; + } } MainLoop main_loop; -- 2.47.3