diff options
Diffstat (limited to 'tests/constr')
-rw-r--r-- | tests/constr/a_module.nim | 6 | ||||
-rw-r--r-- | tests/constr/tconstr1.nim | 28 | ||||
-rw-r--r-- | tests/constr/tconstr2.nim | 22 | ||||
-rw-r--r-- | tests/constr/tglobal.nim | 7 |
4 files changed, 0 insertions, 63 deletions
diff --git a/tests/constr/a_module.nim b/tests/constr/a_module.nim deleted file mode 100644 index 1d3f4848c..000000000 --- a/tests/constr/a_module.nim +++ /dev/null @@ -1,6 +0,0 @@ -# a.nim -{.push stackTrace: off.} -proc foo*(): int = - var a {.global.} = 0 - result = a -{.pop.} \ No newline at end of file diff --git a/tests/constr/tconstr1.nim b/tests/constr/tconstr1.nim deleted file mode 100644 index a169bf453..000000000 --- a/tests/constr/tconstr1.nim +++ /dev/null @@ -1,28 +0,0 @@ -discard """ - errormsg: "type mismatch" - file: "tconstr1.nim" - line: 25 -""" -# Test array, record constructors - -type - TComplexRecord = tuple[ - s: string, - x, y: int, - z: float, - chars: set[char]] - -proc testSem = - var - things: array[0..1, TComplexRecord] = [ - (s: "hi", x: 69, y: 45, z: 0.0, chars: {'a', 'b', 'c'}), - (s: "hi", x: 69, y: 45, z: 1.0, chars: {'a', 'b', 'c'})] - write(stdout, things[0].x) - -const - things: array[0..1, TComplexRecord] = [ - (s: "hi", x: 69, y: 45, z: 0.0, chars: {'a', 'b', 'c'}), - (s: "hi", x: 69, y: 45, z: 1.0)] #ERROR - otherThings = [ # the same - (s: "hi", x: 69, y: 45, z: 0.0, chars: {'a', 'b', 'c'}), - (s: "hi", x: 69, y: 45, z: 1.0, chars: {'a'})] diff --git a/tests/constr/tconstr2.nim b/tests/constr/tconstr2.nim deleted file mode 100644 index 2557d7db9..000000000 --- a/tests/constr/tconstr2.nim +++ /dev/null @@ -1,22 +0,0 @@ -discard """ - output: "69" -""" -# Test array, record constructors - -type - TComplexRecord = tuple[ - s: string, - x, y: int, - z: float, - chars: set[char]] - -const - things: array[0..1, TComplexRecord] = [ - (s: "hi", x: 69, y: 45, z: 0.0, chars: {'a', 'b', 'c'}), - (s: "hi", x: 69, y: 45, z: 1.0, chars: {})] - otherThings = [ # the same - (s: "hi", x: 69, y: 45, z: 0.0, chars: {'a', 'b', 'c'}), - (s: "hi", x: 69, y: 45, z: 1.0, chars: {'a'})] - -writeLine(stdout, things[0].x) -#OUT 69 diff --git a/tests/constr/tglobal.nim b/tests/constr/tglobal.nim deleted file mode 100644 index 056ac9f81..000000000 --- a/tests/constr/tglobal.nim +++ /dev/null @@ -1,7 +0,0 @@ -discard """ -output: "0" -""" - -# b.nim -import a_module -echo foo() \ No newline at end of file |