diff options
Diffstat (limited to '')
-rw-r--r-- | test cases/vala/17 plain consumer/app.c | 11 | ||||
-rw-r--r-- | test cases/vala/17 plain consumer/badger.vala | 10 | ||||
-rw-r--r-- | test cases/vala/17 plain consumer/meson.build | 12 |
3 files changed, 33 insertions, 0 deletions
diff --git a/test cases/vala/17 plain consumer/app.c b/test cases/vala/17 plain consumer/app.c new file mode 100644 index 0000000..c8d0010 --- /dev/null +++ b/test cases/vala/17 plain consumer/app.c @@ -0,0 +1,11 @@ +#include "badger.h" + +int main(int argc, char *argv[]) { + Badger *badger; + + badger = g_object_new(TYPE_BADGER, NULL); + g_print("Badger whose name is '%s'\n", badger_get_name(badger)); + g_object_unref(badger); + + return 0; +} diff --git a/test cases/vala/17 plain consumer/badger.vala b/test cases/vala/17 plain consumer/badger.vala new file mode 100644 index 0000000..1aaeda6 --- /dev/null +++ b/test cases/vala/17 plain consumer/badger.vala @@ -0,0 +1,10 @@ +public class Badger : Object { + public string name { + get; + construct; + } + + Badger() { + Object(name: "Joe"); + } +} diff --git a/test cases/vala/17 plain consumer/meson.build b/test cases/vala/17 plain consumer/meson.build new file mode 100644 index 0000000..e98bca1 --- /dev/null +++ b/test cases/vala/17 plain consumer/meson.build @@ -0,0 +1,12 @@ +project('plain consumer', 'vala', 'c') + +deps = [dependency('glib-2.0'), dependency('gobject-2.0')] + +badger = static_library('badger', 'badger.vala', + dependencies : deps) + +app = executable('app', 'app.c', + link_with : badger, + dependencies : deps) + +test('valaplainconsumertest', app) |