mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-03 14:13:09 +00:00
verify that multiple decr's afterwords work
This commit is contained in:
parent
bcce5331bb
commit
1991fdbc29
@ -48,6 +48,10 @@ proc runDestroyOnReleaseTest() =
|
||||
finally:
|
||||
a.release()
|
||||
check intref[] == 0
|
||||
## important a should be nil now!
|
||||
## to prevent future decr's from occuring
|
||||
check a.isNil == true
|
||||
a.decr()
|
||||
|
||||
|
||||
suite "Share buffer test":
|
||||
@ -86,6 +90,11 @@ suite "Share buffer test":
|
||||
a.release()
|
||||
check intref[] == 0
|
||||
|
||||
## important a should be nil now!
|
||||
## to prevent future decr's from occuring
|
||||
check a.isNil == true
|
||||
a.decr()
|
||||
|
||||
test "test destroy release generic no proc":
|
||||
echo "\nintref setup:\n"
|
||||
let intref: ref int = new(ref int)
|
||||
@ -96,4 +105,4 @@ suite "Share buffer test":
|
||||
check b[].val[] == 30
|
||||
finally:
|
||||
b.release()
|
||||
check intref[] == 0
|
||||
check intref[] == 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user