10 years later... updates for modern Nim.
FossilOrigin-Name: 7361ae25595c1916e9701a25033b684e3cd089d8abb71ead3803a59e36189f63
This commit is contained in:
parent
ae7b77df4c
commit
9aa2912286
23 changed files with 640 additions and 371 deletions
17
tests/tnetobjects/t_can_paired_elements.nim
Normal file
17
tests/tnetobjects/t_can_paired_elements.nim
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# vim: set et sta sw=4 ts=4 :
|
||||
|
||||
import tnetstring
|
||||
|
||||
let tnet_obj = newTNetstringObject()
|
||||
tnet_obj.add( "yo", newTNetstringInt(1) )
|
||||
tnet_obj.add( "yep", newTNetstringInt(2) )
|
||||
|
||||
assert tnet_obj["yo"].num == 1
|
||||
assert tnet_obj["yep"].num == 2
|
||||
assert tnet_obj.len == 2
|
||||
|
||||
tnet_obj[ "more" ] = newTNetstringInt(1)
|
||||
tnet_obj[ "yo" ] = newTNetstringInt(1) # dup check
|
||||
|
||||
assert tnet_obj.len == 3
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue