Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
This commit is contained in:
parent
f02e159b56
commit
70a30317f7
28 changed files with 103 additions and 52 deletions
|
|
@ -1,5 +1,6 @@
|
|||
discard """
|
||||
ccodecheck: "baz"
|
||||
targets: "c"
|
||||
ccodecheck: "baz"
|
||||
"""
|
||||
|
||||
proc foo(): void {.exportc: "bar".}=
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
discard """
|
||||
errormsg: "undeclared identifier: 'undeclared'"
|
||||
line: 8
|
||||
column: 7
|
||||
errormsg: "undeclared identifier: 'undeclared'"
|
||||
targets: "c"
|
||||
line: 9
|
||||
column: 7
|
||||
"""
|
||||
|
||||
# test should fail because the line directive is wrong
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
discard """
|
||||
errormsg: "wrong error message"
|
||||
line: 8
|
||||
column: 6
|
||||
errormsg: "wrong error message"
|
||||
targets: "c"
|
||||
line: 9
|
||||
column: 6
|
||||
"""
|
||||
|
||||
# test should fail because the line directive is wrong
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
discard """
|
||||
exitcode: 1
|
||||
targets: "c"
|
||||
exitcode: 1
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
discard """
|
||||
errormsg: "undeclared identifier: 'undefined'"
|
||||
file: "notthisfile.nim"
|
||||
targets: "c"
|
||||
errormsg: "undeclared identifier: 'undefined'"
|
||||
file: "notthisfile.nim"
|
||||
"""
|
||||
|
||||
echo undefined
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
discard """
|
||||
errormsg: "undeclared identifier: 'undeclared'"
|
||||
line: 9
|
||||
column: 6
|
||||
targets: "c"
|
||||
errormsg: "undeclared identifier: 'undeclared'"
|
||||
line: 10
|
||||
column: 6
|
||||
"""
|
||||
|
||||
# test should fail because the line directive is wrong
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
discard """
|
||||
maxcodesize: 1
|
||||
targets: "c"
|
||||
maxcodesize: 1
|
||||
"""
|
||||
|
||||
echo "Hello World"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
discard """
|
||||
nimout: "Hello World!"
|
||||
action: compile
|
||||
targets: "c"
|
||||
nimout: "Hello World!"
|
||||
action: compile
|
||||
"""
|
||||
|
||||
static:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
discard """
|
||||
output: '''
|
||||
done
|
||||
'''
|
||||
targets: "c"
|
||||
output: '''
|
||||
done
|
||||
'''
|
||||
"""
|
||||
|
||||
echo "broken"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
discard """
|
||||
outputsub: "something else"
|
||||
outputsub: "something else"
|
||||
targets: "c"
|
||||
"""
|
||||
|
||||
echo "Hello World!"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
discard """
|
||||
action: "reject"
|
||||
action: "reject"
|
||||
targets: "c"
|
||||
"""
|
||||
|
||||
# Because we set action="reject", we expect this line not to compile. But the
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
discard """
|
||||
sortoutput: true
|
||||
output: '''
|
||||
2
|
||||
1
|
||||
'''
|
||||
sortoutput: true
|
||||
targets: "c"
|
||||
output: '''
|
||||
2
|
||||
1
|
||||
'''
|
||||
"""
|
||||
|
||||
# this test should ensure that the output is actually sorted
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
discard """
|
||||
timeout: "0.1"
|
||||
targets: "c"
|
||||
"""
|
||||
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
discard """
|
||||
valgrind: true
|
||||
cmd: "nim $target --gc:arc -d:useMalloc $options $file"
|
||||
valgrind: true
|
||||
targets: "c"
|
||||
cmd: "nim $target --gc:arc -d:useMalloc $options $file"
|
||||
"""
|
||||
|
||||
# this is the same check used by testament/specs.nim whether or not valgrind
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue