summaryrefslogtreecommitdiffstats
path: root/test cases/vala/20 genie multiple mixed sources
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/20 genie multiple mixed sources
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 '')
-rw-r--r--test cases/vala/20 genie multiple mixed sources/c_test_one.c5
-rw-r--r--test cases/vala/20 genie multiple mixed sources/c_test_two.c5
-rw-r--r--test cases/vala/20 genie multiple mixed sources/init.gs10
-rw-r--r--test cases/vala/20 genie multiple mixed sources/meson.build19
-rw-r--r--test cases/vala/20 genie multiple mixed sources/test_one.gs5
-rw-r--r--test cases/vala/20 genie multiple mixed sources/test_two.gs5
-rw-r--r--test cases/vala/20 genie multiple mixed sources/vala_test_one.vala7
-rw-r--r--test cases/vala/20 genie multiple mixed sources/vala_test_two.vala7
8 files changed, 63 insertions, 0 deletions
diff --git a/test cases/vala/20 genie multiple mixed sources/c_test_one.c b/test cases/vala/20 genie multiple mixed sources/c_test_one.c
new file mode 100644
index 0000000..d0b7e05
--- /dev/null
+++ b/test cases/vala/20 genie multiple mixed sources/c_test_one.c
@@ -0,0 +1,5 @@
+#include <glib.h>
+
+gboolean c_test_one_is_true (void) {
+ return TRUE;
+}
diff --git a/test cases/vala/20 genie multiple mixed sources/c_test_two.c b/test cases/vala/20 genie multiple mixed sources/c_test_two.c
new file mode 100644
index 0000000..596928b
--- /dev/null
+++ b/test cases/vala/20 genie multiple mixed sources/c_test_two.c
@@ -0,0 +1,5 @@
+#include <glib.h>
+
+gboolean c_test_two_is_true (void) {
+ return TRUE;
+}
diff --git a/test cases/vala/20 genie multiple mixed sources/init.gs b/test cases/vala/20 genie multiple mixed sources/init.gs
new file mode 100644
index 0000000..1564403
--- /dev/null
+++ b/test cases/vala/20 genie multiple mixed sources/init.gs
@@ -0,0 +1,10 @@
+def extern c_test_one_is_true():bool
+def extern c_test_two_is_true():bool
+
+init
+ assert( new Genie.TestOne().is_true() )
+ assert( new Genie.TestTwo().is_true() )
+ assert( new Vala.TestOne().is_true() )
+ assert( new Vala.TestTwo().is_true() )
+ assert( c_test_one_is_true() )
+ assert( c_test_two_is_true() )
diff --git a/test cases/vala/20 genie multiple mixed sources/meson.build b/test cases/vala/20 genie multiple mixed sources/meson.build
new file mode 100644
index 0000000..148ce0e
--- /dev/null
+++ b/test cases/vala/20 genie multiple mixed sources/meson.build
@@ -0,0 +1,19 @@
+project( 'Genie multiple and mixed sources', 'vala', 'c' )
+
+genie_deps = [
+ dependency( 'glib-2.0' ),
+ dependency( 'gobject-2.0' ),
+]
+
+sources = [
+ 'init.gs',
+ 'test_one.gs',
+ 'test_two.gs',
+ 'vala_test_one.vala',
+ 'vala_test_two.vala',
+ 'c_test_one.c',
+ 'c_test_two.c',
+]
+
+prog = executable( 'genie_prog', sources, dependencies: genie_deps )
+test( 'Given a Genie program when it is compiled from multiple mixed sources then it should work', prog )
diff --git a/test cases/vala/20 genie multiple mixed sources/test_one.gs b/test cases/vala/20 genie multiple mixed sources/test_one.gs
new file mode 100644
index 0000000..af3b1ec
--- /dev/null
+++ b/test cases/vala/20 genie multiple mixed sources/test_one.gs
@@ -0,0 +1,5 @@
+namespace Genie
+
+ class TestOne
+ def is_true():bool
+ return true
diff --git a/test cases/vala/20 genie multiple mixed sources/test_two.gs b/test cases/vala/20 genie multiple mixed sources/test_two.gs
new file mode 100644
index 0000000..0a0e03c
--- /dev/null
+++ b/test cases/vala/20 genie multiple mixed sources/test_two.gs
@@ -0,0 +1,5 @@
+namespace Genie
+
+ class TestTwo
+ def is_true():bool
+ return true
diff --git a/test cases/vala/20 genie multiple mixed sources/vala_test_one.vala b/test cases/vala/20 genie multiple mixed sources/vala_test_one.vala
new file mode 100644
index 0000000..7044bc8
--- /dev/null
+++ b/test cases/vala/20 genie multiple mixed sources/vala_test_one.vala
@@ -0,0 +1,7 @@
+namespace Vala {
+ public class TestOne {
+ public bool is_true() {
+ return true;
+ }
+ }
+}
diff --git a/test cases/vala/20 genie multiple mixed sources/vala_test_two.vala b/test cases/vala/20 genie multiple mixed sources/vala_test_two.vala
new file mode 100644
index 0000000..b530efb
--- /dev/null
+++ b/test cases/vala/20 genie multiple mixed sources/vala_test_two.vala
@@ -0,0 +1,7 @@
+namespace Vala {
+ public class TestTwo {
+ public bool is_true() {
+ return true;
+ }
+ }
+}