Test that warnings apply to C files in Vala targets

pull/866/head
Nirbheek Chauhan 8 years ago
parent b08c8c7b77
commit 354c4bcaeb
  1. 10
      test cases/failing build/1 vala c werror/meson.build
  2. 7
      test cases/failing build/1 vala c werror/prog.vala
  3. 6
      test cases/failing build/1 vala c werror/unused-var.c

@ -0,0 +1,10 @@
project('valatest', 'c', default_options : 'werror=true')
if find_program('valac', required : false).found()
add_languages('vala')
valadeps = [dependency('glib-2.0'), dependency('gobject-2.0')]
# Must fail due to -Werror and unused variable in C file
executable('valaprog', 'prog.vala', 'unused-var.c', dependencies : valadeps)
else
executable('failprog', 'unused-var.c')
endif

@ -0,0 +1,7 @@
class MainProg : GLib.Object {
public static int main(string[] args) {
stdout.printf("Vala is working.\n");
return 0;
}
}

@ -0,0 +1,6 @@
int
somelib(void)
{
int unused_var;
return 33;
}
Loading…
Cancel
Save