parent
43bcaacfc9
commit
2ad1113b7e
20 changed files with 106 additions and 0 deletions
@ -0,0 +1,8 @@ |
||||
project('test', default_options: ['werror=true']) |
||||
if meson.backend().startswith('vs') |
||||
error('MESON_SKIP_TEST: VS backend does not recognise NASM yet') |
||||
endif |
||||
if not add_languages('nasm', required: false) |
||||
error('MESON_SKIP_TEST: nasm not found') |
||||
endif |
||||
executable('prog', 'test.asm') |
@ -0,0 +1,8 @@ |
||||
SECTION .text |
||||
global main |
||||
main: |
||||
mov ebx,0 |
||||
mov eax,1 |
||||
int 0x80 |
||||
|
||||
%warning oops |
@ -0,0 +1,5 @@ |
||||
project('test', default_options: ['werror=true']) |
||||
if not add_languages('objc', required: false) |
||||
error('MESON_SKIP_TEST: Objective C not found') |
||||
endif |
||||
executable('prog', 'test.m') |
@ -0,0 +1,5 @@ |
||||
#import<stdio.h> |
||||
|
||||
int main(void) { |
||||
return 1 / 0; |
||||
} |
@ -0,0 +1,5 @@ |
||||
project('test', default_options: ['werror=true']) |
||||
if not add_languages('objcpp', required: false) |
||||
error('MESON_SKIP_TEST: Objective C++ not found') |
||||
endif |
||||
executable('prog', 'test.mm') |
@ -0,0 +1,8 @@ |
||||
#import<stdio.h> |
||||
|
||||
class MyClass { |
||||
}; |
||||
|
||||
int main(void) { |
||||
return 1 / 0; |
||||
} |
@ -0,0 +1,8 @@ |
||||
project('test', default_options: ['werror=true']) |
||||
if meson.backend() != 'ninja' |
||||
error('MESON_SKIP_TEST: Rust requires Ninja backend') |
||||
endif |
||||
if not add_languages('rust', required: false) |
||||
error('MESON_SKIP_TEST: Rust not found') |
||||
endif |
||||
executable('prog', 'test.rs') |
@ -0,0 +1,4 @@ |
||||
#[warn(unconditional_panic)] |
||||
fn main() { |
||||
println!("Hello, world {}!", 1 / 0); |
||||
} |
@ -0,0 +1,5 @@ |
||||
project('test', default_options: ['werror=true']) |
||||
if not add_languages('swift', required: false) |
||||
error('MESON_SKIP_TEST: Swift not found') |
||||
endif |
||||
executable('prog', 'test.swift') |
@ -0,0 +1,2 @@ |
||||
#warning("oops") |
||||
print("Hello, World!") |
@ -0,0 +1,2 @@ |
||||
project('test', 'c', default_options: ['werror=true']) |
||||
executable('prog', 'test.c') |
@ -0,0 +1,3 @@ |
||||
int main(int argc, char **argv) { |
||||
return 1 / 0; |
||||
} |
@ -0,0 +1,2 @@ |
||||
project('test', 'cpp', default_options: ['werror=true']) |
||||
executable('prog', 'test.cpp') |
@ -0,0 +1,3 @@ |
||||
int main(int argc, char **argv) { |
||||
return 1 / 0; |
||||
} |
@ -0,0 +1,8 @@ |
||||
project('test', default_options: ['werror=true']) |
||||
if meson.backend() != 'ninja' |
||||
error('MESON_SKIP_TEST: C# requires Ninja backend') |
||||
endif |
||||
if not add_languages('cs', required: false) |
||||
error('MESON_SKIP_TEST: C# not found') |
||||
endif |
||||
executable('prog', 'test.cs') |
@ -0,0 +1,8 @@ |
||||
namespace HelloWorld { |
||||
class Hello { |
||||
static void Main(string[] args) { |
||||
int w = 0; // unused |
||||
System.Console.WriteLine("Hello World!"); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,5 @@ |
||||
project('test', default_options: ['warning_level=3', 'werror=true']) |
||||
if not add_languages('fortran', required: false) |
||||
error('MESON_SKIP_TEST: Fortran not found') |
||||
endif |
||||
executable('prog', 'test.f90') |
@ -0,0 +1,4 @@ |
||||
program main |
||||
integer :: i |
||||
print *, ii |
||||
end program |
@ -0,0 +1,5 @@ |
||||
public class Test { |
||||
public static void main(String args[]) { |
||||
System.out.println(1 / 0); |
||||
} |
||||
} |
@ -0,0 +1,8 @@ |
||||
project('test', default_options: ['werror=true']) |
||||
if meson.backend() != 'ninja' |
||||
error('MESON_SKIP_TEST: Java requires Ninja backend') |
||||
endif |
||||
if not add_languages('java', required: false) |
||||
error('MESON_SKIP_TEST: Java not found') |
||||
endif |
||||
jar('prog', 'Test.java') |
Loading…
Reference in new issue