Skip to content

Commit

Permalink
tests: Add nasm compiler checks
Browse files Browse the repository at this point in the history
  • Loading branch information
xclaesse authored and jpakkane committed Oct 25, 2022
1 parent d67c4c6 commit 725f776
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test cases/nasm/2 asm language/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@ if not add_languages('nasm', required: false)
error('MESON_SKIP_TEST: nasm not found')
endif

nasm = meson.get_compiler('nasm')

code = '''
SECTION .text
global main
main:
mov foo,bar ; error: symbol `foo' not defined
'''
assert(not nasm.compiles(code, name: 'Invalid NASM code'))

code = '''
SECTION .text
global main
main:
mov eax,1
'''
assert(nasm.compiles(code, name: 'Valid NASM code'))

config_file = configure_file(
output: 'config.asm',
configuration: {'HELLO': 0},
Expand Down

0 comments on commit 725f776

Please sign in to comment.