aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/vala/2 multiple files
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/vala/2 multiple files')
-rw-r--r--meson/test cases/vala/2 multiple files/class1.vala7
-rw-r--r--meson/test cases/vala/2 multiple files/class2.vala6
-rw-r--r--meson/test cases/vala/2 multiple files/main.vala8
-rw-r--r--meson/test cases/vala/2 multiple files/meson.build10
4 files changed, 31 insertions, 0 deletions
diff --git a/meson/test cases/vala/2 multiple files/class1.vala b/meson/test cases/vala/2 multiple files/class1.vala
new file mode 100644
index 000000000..7072101d5
--- /dev/null
+++ b/meson/test cases/vala/2 multiple files/class1.vala
@@ -0,0 +1,7 @@
+class Class1 : GLib.Object {
+
+ public void hello() {
+ var c2 = new Class2();
+ c2.hello();
+ }
+}
diff --git a/meson/test cases/vala/2 multiple files/class2.vala b/meson/test cases/vala/2 multiple files/class2.vala
new file mode 100644
index 000000000..ad76cc159
--- /dev/null
+++ b/meson/test cases/vala/2 multiple files/class2.vala
@@ -0,0 +1,6 @@
+class Class2 : GLib.Object {
+
+ public void hello() {
+ stdout.printf("Multiple file Vala project is working.\n");
+ }
+}
diff --git a/meson/test cases/vala/2 multiple files/main.vala b/meson/test cases/vala/2 multiple files/main.vala
new file mode 100644
index 000000000..6de0fa391
--- /dev/null
+++ b/meson/test cases/vala/2 multiple files/main.vala
@@ -0,0 +1,8 @@
+class MainProg : GLib.Object {
+
+ public static int main(string[] args) {
+ var c1 = new Class1();
+ c1.hello();
+ return 0;
+ }
+}
diff --git a/meson/test cases/vala/2 multiple files/meson.build b/meson/test cases/vala/2 multiple files/meson.build
new file mode 100644
index 000000000..dc3607377
--- /dev/null
+++ b/meson/test cases/vala/2 multiple files/meson.build
@@ -0,0 +1,10 @@
+# adding 'c' shouldn't be required
+project('multiple files')
+add_languages('vala')
+
+glib = dependency('glib-2.0')
+gobject = dependency('gobject-2.0')
+
+e = executable('prog', 'main.vala', 'class1.vala', 'class2.vala',
+dependencies : [glib, gobject])
+test('multiple file test', e)