summaryrefslogtreecommitdiffstats
path: root/test cases/vala/16 mixed dependence
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
commit7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch)
tree4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/vala/16 mixed dependence
parentInitial commit. (diff)
downloadmeson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz
meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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();
+}