summaryrefslogtreecommitdiffstats
path: root/test cases/vala/16 mixed dependence
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/vala/16 mixed dependence')
-rw-r--r--test cases/vala/16 mixed dependence/app.vala7
-rw-r--r--test cases/vala/16 mixed dependence/meson.build16
-rw-r--r--test cases/vala/16 mixed dependence/mixer-glue.c5
-rw-r--r--test cases/vala/16 mixed dependence/mixer.vala3
4 files changed, 31 insertions, 0 deletions
diff --git a/test cases/vala/16 mixed dependence/app.vala b/test cases/vala/16 mixed dependence/app.vala
new file mode 100644
index 0000000..5b54543
--- /dev/null
+++ b/test cases/vala/16 mixed dependence/app.vala
@@ -0,0 +1,7 @@
+namespace App {
+ public static int main(string[] args) {
+ var mixer = new Mixer();
+ print("Current volume is %u\n", mixer.get_volume());
+ return 0;
+ }
+}
diff --git a/test cases/vala/16 mixed dependence/meson.build b/test cases/vala/16 mixed dependence/meson.build
new file mode 100644
index 0000000..b44b47b
--- /dev/null
+++ b/test cases/vala/16 mixed dependence/meson.build
@@ -0,0 +1,16 @@
+project('mixed dependence', 'vala', 'c')
+
+cc = meson.get_compiler('c')
+
+deps = [dependency('glib-2.0'), dependency('gobject-2.0'),
+ # Should be ignored, see https://github.com/mesonbuild/meson/issues/1939
+ cc.find_library('z')]
+
+mixer = static_library('mixer', 'mixer.vala', 'mixer-glue.c',
+ dependencies : deps)
+
+app = executable('app', 'app.vala',
+ link_with : mixer,
+ dependencies : deps)
+
+test('valamixeddependencetest', app)
diff --git a/test cases/vala/16 mixed dependence/mixer-glue.c b/test cases/vala/16 mixed dependence/mixer-glue.c
new file mode 100644
index 0000000..d6c0c37
--- /dev/null
+++ b/test cases/vala/16 mixed dependence/mixer-glue.c
@@ -0,0 +1,5 @@
+#include "mixer.h"
+
+guint mixer_get_volume(Mixer *mixer) {
+ return 11;
+}
diff --git a/test cases/vala/16 mixed dependence/mixer.vala b/test cases/vala/16 mixed dependence/mixer.vala
new file mode 100644
index 0000000..f207132
--- /dev/null
+++ b/test cases/vala/16 mixed dependence/mixer.vala
@@ -0,0 +1,3 @@
+public class Mixer : Object {
+ public extern uint get_volume();
+}