Guest User

IntSet bug

a guest
Mar 15th, 2016
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nim 0.24 KB | None | 0 0
  1. import json
  2. import intsets
  3.  
  4. var cache = initIntSet()
  5. for i in 0..100000:
  6.     var keyEntryHash=hash(%*{"key2":i})
  7.     assert(cache.contains(keyEntryHash)==false,"Key value not unique")
  8.     cache.incl(keyEntryHash)
  9.     echo i
  10. echo "Done"
Advertisement
Add Comment
Please, Sign In to add comment