testament: error instead of silently ignore invalid targets; remove pointless alias target vs targets; document matrix; DRY (#16343)

* testament: error instead of silently ignore invalid targets
* s/target/targets/
* fix test; refs #16344
* address comments
* Update testament/specs.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
Timothee Cour 2020-12-14 01:58:29 -08:00 • committed by GitHub
commit 7e1ae35195
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 33 additions and 39 deletions

View file

@ -1,6 +1,6 @@
discard """
ccodeCheck: "\\i @'NIM_ALIGN(128) NI mylocal1' .*"
target: "c cpp"
targets: "c cpp"
output: "align ok"
"""

View file

@ -1,7 +1,7 @@
discard """
output: '''1 [2, 3, 4, 7]
[0, 0]'''
target: "c"
targets: "c"
joinable: false
disabled: 32bit
cmd: "nim c --gc:arc $file"

View file

@ -2,7 +2,7 @@ discard """
output: "1"
cmd: r"nim c --hints:on $options -d:release $file"
ccodecheck: "'NI volatile state;'"
target: "C"
targets: "c"
"""
# bug #1539

View file

@ -2,7 +2,7 @@ discard """
output: "5"
cmd: r"nim c --hints:on $options -d:release $file"
ccodecheck: "'/*PROGMEM*/ myLetVariable = {'"
target: "C"
targets: "c"
"""
var myLetVariable {.exportc, codegenDecl: "$# /*PROGMEM*/ $#".} = [1, 2, 3]

View file

@ -6,7 +6,7 @@ of
words'''
cmd: r"nim c --hints:on $options -d:release $file"
ccodecheck: "! @'genericSeqAssign'"
target: "c"
targets: "c"
"""
# bug #4354

View file

@ -1,5 +1,5 @@
discard """
target: "c"
targets: "c"
output: '''
1 3 6 11 20 foo
foo88

View file

@ -1,6 +1,5 @@
discard """
cmd: "nim cpp --cppCompileToNamespace:foo $options -r $file"
target: cpp
"""
# Theoretically nim could just ignore the flag cppCompileToNamespace

View file

@ -1,5 +1,5 @@
discard """
target: "c"
targets: "c"
disabled: true
"""

View file

@ -1,5 +1,5 @@
discard """
target: "c"
targets: "c"
"""
import coro

View file

@ -1,5 +1,5 @@
discard """
target: "c"
targets: "c"
disabled: true
"""

View file

@ -1,6 +1,6 @@
discard """
output: "Exit 1\nExit 2"
target: "c"
targets: "c"
"""
import coro

View file

@ -2,7 +2,7 @@ discard """
output: '''0
1
2'''
target: "cpp"
targets: "cpp"
"""
# bug #8202

View file

@ -8,7 +8,7 @@ test destroyed 0
4
Pony is dying!'''
joinable: false
target: "C"
targets: "c"
"""
# bug #4214

View file

@ -1,6 +1,6 @@
discard """
output: ""
target: "C"
targets: "c"
"""
# bug #9594

View file

@ -1,7 +1,7 @@
discard """
action: run
exitcode: 1
target: "c cpp"
targets: "c cpp"
disabled: "openbsd"
disabled: "netbsd"
"""

View file

@ -1,5 +1,5 @@
discard """
target: "c"
targets: "c"
action: compile
"""

View file

@ -1,6 +1,6 @@
discard """
output: "123"
targets: "C"
targets: "c"
"""
# Try to break the transformation pass:
iterator iterAndZero(a: var openArray[int]): int =

View file

@ -1,6 +1,6 @@
discard """
action: compile
target: "c"
targets: "c"
"""
# Covariance is not type safe:

View file

@ -1,5 +1,5 @@
discard """
target: cpp
targets: "cpp"
action: run
exitcode: 0
"""

View file

@ -1,5 +1,5 @@
discard """
targets: '''c c++ js'''
targets: "c cpp js"
"""
import hashes

View file

@ -1,5 +1,5 @@
discard """
target: "c js"
targets: "c js"
"""
import times, strutils, unittest

View file

@ -1,5 +1,5 @@
discard """
target: "c cpp js"
targets: "c cpp js"
"""
var x = 10