diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/vala/20 genie multiple mixed sources | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/vala/20 genie multiple mixed sources')
8 files changed, 64 insertions, 0 deletions
diff --git a/meson/test cases/vala/20 genie multiple mixed sources/c_test_one.c b/meson/test cases/vala/20 genie multiple mixed sources/c_test_one.c new file mode 100644 index 000000000..d0b7e055d --- /dev/null +++ b/meson/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/meson/test cases/vala/20 genie multiple mixed sources/c_test_two.c b/meson/test cases/vala/20 genie multiple mixed sources/c_test_two.c new file mode 100644 index 000000000..596928bce --- /dev/null +++ b/meson/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/meson/test cases/vala/20 genie multiple mixed sources/init.gs b/meson/test cases/vala/20 genie multiple mixed sources/init.gs new file mode 100644 index 000000000..14bfbf8ac --- /dev/null +++ b/meson/test cases/vala/20 genie multiple mixed sources/init.gs @@ -0,0 +1,11 @@ +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/meson/test cases/vala/20 genie multiple mixed sources/meson.build b/meson/test cases/vala/20 genie multiple mixed sources/meson.build new file mode 100644 index 000000000..148ce0e47 --- /dev/null +++ b/meson/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/meson/test cases/vala/20 genie multiple mixed sources/test_one.gs b/meson/test cases/vala/20 genie multiple mixed sources/test_one.gs new file mode 100644 index 000000000..af3b1ecf3 --- /dev/null +++ b/meson/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/meson/test cases/vala/20 genie multiple mixed sources/test_two.gs b/meson/test cases/vala/20 genie multiple mixed sources/test_two.gs new file mode 100644 index 000000000..0a0e03c0a --- /dev/null +++ b/meson/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/meson/test cases/vala/20 genie multiple mixed sources/vala_test_one.vala b/meson/test cases/vala/20 genie multiple mixed sources/vala_test_one.vala new file mode 100644 index 000000000..7044bc8a9 --- /dev/null +++ b/meson/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/meson/test cases/vala/20 genie multiple mixed sources/vala_test_two.vala b/meson/test cases/vala/20 genie multiple mixed sources/vala_test_two.vala new file mode 100644 index 000000000..b530efb9d --- /dev/null +++ b/meson/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; + } + } +} |