start of tests refactoring; sqlite3 new wrapper fixes
This commit is contained in:
parent
6bc16904ed
commit
d913fdb280
173 changed files with 206 additions and 238 deletions
22
tests/accept/compile/tident.nim
Normal file
22
tests/accept/compile/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