Skip to content

Commit b97d603

Browse files
authored
some test cleanups & category reorganization (#22010)
* clean up some test categories * mention exact slice issue * magics into system * move trangechecks into overflow * move tmemory to system * try fix CI * try fix CI * final CI fix
1 parent 2ab948c commit b97d603

File tree

134 files changed

+189
-374
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+189
-374
lines changed

testament/categories.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ proc jsTests(r: var TResults, cat: Category, options: string) =
215215
for testfile in ["exception/texceptions", "exception/texcpt1",
216216
"exception/texcsub", "exception/tfinally",
217217
"exception/tfinally2", "exception/tfinally3",
218-
"actiontable/tactiontable", "method/tmultimjs",
218+
"collections/tactiontable", "method/tmultimjs",
219219
"varres/tvarres0", "varres/tvarres3", "varres/tvarres4",
220-
"varres/tvartup", "misc/tints", "misc/tunsignedinc",
220+
"varres/tvartup", "int/tints", "int/tunsignedinc",
221221
"async/tjsandnativeasync"]:
222222
test "tests/" & testfile & ".nim"
223223

testament/testament.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ proc cmpMsgs(r: var TResults, expected, given: TSpec, test: TTest,
380380
r.addResult(test, target, extraOptions, expected.nimout, given.nimout, reMsgsDiffer)
381381
elif extractFilename(expected.file) != extractFilename(given.file) and
382382
"internal error:" notin expected.msg:
383-
r.addResult(test, target, extraOptions, expected.filename, given.file, reFilesDiffer)
383+
r.addResult(test, target, extraOptions, expected.file, given.file, reFilesDiffer)
384384
elif expected.line != given.line and expected.line != 0 or
385385
expected.column != given.column and expected.column != 0:
386386
r.addResult(test, target, extraOptions, $expected.line & ':' & $expected.column,
File renamed without changes.
File renamed without changes.

tests/bind/tdatabind.nim

Lines changed: 0 additions & 95 deletions
This file was deleted.
File renamed without changes.

tests/compilepragma/test.nim renamed to tests/c/tcompile.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ discard """
33
joinable: "false"
44
"""
55

6-
{.compile: "test.c".}
6+
{.compile: "tcompile.c".}
77

88
proc foo(a, b: cint): cint {.importc: "foo", cdecl.}
99

File renamed without changes.
Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
discard """
2-
targets: "c cpp"
3-
"""
4-
5-
import macros
6-
7-
macro make_test_type(idents: varargs[untyped]): untyped =
8-
result = nnkStmtList.newTree()
9-
10-
var ident_defs: seq[NimNode] = @[]
11-
for i in idents:
12-
ident_defs.add newIdentDefs(i, ident("int"))
13-
14-
result.add newTree(nnkTypeSection,
15-
newTree(nnkTypeDef,
16-
ident("TestType"),
17-
newEmptyNode(),
18-
newTree(nnkObjectTy,
19-
newEmptyNode(),
20-
newEmptyNode(),
21-
newTree(nnkRecList,
22-
ident_defs
23-
)
24-
)
25-
)
26-
)
27-
28-
make_test_type(
29-
auto, bool, catch, char, class, compl, const_cast, default, delete, double,
30-
dynamic_cast, explicit, extern, false, float, friend, goto, int, long,
31-
mutable, namespace, new, operator, private, protected, public, register,
32-
reinterpret_cast, restrict, short, signed, sizeof, static_cast, struct, switch,
33-
this, throw, true, typedef, typeid, typeof, typename, union, packed, unsigned,
34-
virtual, void, volatile, wchar_t, alignas, alignof, constexpr, decltype, nullptr,
35-
noexcept, thread_local, static_assert, char16_t, char32_t
36-
)
37-
38-
# Make sure the type makes it to codegen.
39-
var test_instance: TestType
1+
discard """
2+
targets: "c cpp"
3+
"""
4+
5+
import macros
6+
7+
macro make_test_type(idents: varargs[untyped]): untyped =
8+
result = nnkStmtList.newTree()
9+
10+
var ident_defs: seq[NimNode] = @[]
11+
for i in idents:
12+
ident_defs.add newIdentDefs(i, ident("int"))
13+
14+
result.add newTree(nnkTypeSection,
15+
newTree(nnkTypeDef,
16+
ident("TestType"),
17+
newEmptyNode(),
18+
newTree(nnkObjectTy,
19+
newEmptyNode(),
20+
newEmptyNode(),
21+
newTree(nnkRecList,
22+
ident_defs
23+
)
24+
)
25+
)
26+
)
27+
28+
make_test_type(
29+
auto, bool, catch, char, class, compl, const_cast, default, delete, double,
30+
dynamic_cast, explicit, extern, false, float, friend, goto, int, long,
31+
mutable, namespace, new, operator, private, protected, public, register,
32+
reinterpret_cast, restrict, short, signed, sizeof, static_cast, struct, switch,
33+
this, throw, true, typedef, typeid, typeof, typename, union, packed, unsigned,
34+
virtual, void, volatile, wchar_t, alignas, alignof, constexpr, decltype, nullptr,
35+
noexcept, thread_local, static_assert, char16_t, char32_t
36+
)
37+
38+
# Make sure the type makes it to codegen.
39+
var test_instance: TestType
File renamed without changes.

0 commit comments

Comments
 (0)