From: Jürg Billeter Date: Mon, 15 Jun 2009 06:38:19 +0000 (+0200) Subject: D-Bus: Test properties X-Git-Tag: 0.7.4~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=386d80cbc3ff7b6898ff0fc84e899e2e8339bdec;p=thirdparty%2Fvala.git D-Bus: Test properties --- 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;