Skip to content

Commit 725f776

Browse files
xclaessejpakkane
authored andcommitted
tests: Add nasm compiler checks
1 parent d67c4c6 commit 725f776

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test cases/nasm/2 asm language/meson.build

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,24 @@ if not add_languages('nasm', required: false)
1111
error('MESON_SKIP_TEST: nasm not found')
1212
endif
1313

14+
nasm = meson.get_compiler('nasm')
15+
16+
code = '''
17+
SECTION .text
18+
global main
19+
main:
20+
mov foo,bar ; error: symbol `foo' not defined
21+
'''
22+
assert(not nasm.compiles(code, name: 'Invalid NASM code'))
23+
24+
code = '''
25+
SECTION .text
26+
global main
27+
main:
28+
mov eax,1
29+
'''
30+
assert(nasm.compiles(code, name: 'Valid NASM code'))
31+
1432
config_file = configure_file(
1533
output: 'config.asm',
1634
configuration: {'HELLO': 0},

0 commit comments

Comments
 (0)