new tester; all tests categorized
This commit is contained in:
parent
51ee524109
commit
20b5f31c03
481 changed files with 794 additions and 2506 deletions
22
tests/lexer/tident.nim
Normal file
22
tests/lexer/tident.nim
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
type
|
||||
TIdObj* = object of TObject
|
||||
id*: int # unique id; use this for comparisons and not the pointers
|
||||
|
||||
PIdObj* = ref TIdObj
|
||||
PIdent* = ref TIdent
|
||||
TIdent*{.acyclic.} = object
|
||||
s*: string
|
||||
|
||||
proc myNewString(L: int): string {.inline.} =
|
||||
result = newString(L)
|
||||
if result.len == L: echo("Length correct")
|
||||
else: echo("bug")
|
||||
for i in 0..L-1:
|
||||
if result[i] == '\0':
|
||||
echo("Correct")
|
||||
else:
|
||||
echo("Wrong")
|
||||
|
||||
var s = myNewString(8)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue