new tester; all tests categorized
This commit is contained in:
parent
51ee524109
commit
20b5f31c03
481 changed files with 794 additions and 2506 deletions
16
tests/global/tglobal.nim
Normal file
16
tests/global/tglobal.nim
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
discard """
|
||||
file: "toop1.nim"
|
||||
output: "in globalaux2: 10\ntotal globals: 2\nint value: 100\nstring value: second"
|
||||
"""
|
||||
|
||||
import globalaux, globalaux2
|
||||
|
||||
echo "total globals: ", totalGlobals
|
||||
|
||||
globalInstance[int]().val = 100
|
||||
echo "int value: ", globalInstance[int]().val
|
||||
|
||||
globalInstance[string]().val = "first"
|
||||
globalInstance[string]().val = "second"
|
||||
echo "string value: ", globalInstance[string]().val
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue