summary refs log tree commit diff stats
path: root/examples/cross_calculator/android/AndroidManifest.xml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cross_calculator/android/AndroidManifest.xml')
0 files changed, 0 insertions, 0 deletions
d='n33' href='#n33'>33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61

                    


























































                                                                
discard """
  output: '''true'''
"""

import hashes, sets

const
  data = [
    "34", "12",
    "90", "0",
    "1", "2",
    "3", "4",
    "5", "6",
    "7", "8",
    "9", "---00",
    "10", "11", "19",
    "20", "30", "40",
    "50", "60", "70",
    "80"]

block tableTest1:
  var t = initSet[tuple[x, y: int]]()
  t.incl((0,0))
  t.incl((1,0))
  assert(not t.containsOrIncl((0,1)))
  t.incl((1,1))

  for x in 0..1:
    for y in 0..1:
      assert((x,y) in t)
  #assert($t == 
  #  "{(x: 0, y: 0), (x: 0, y: 1), (x: 1, y: 0), (x: 1, y: 1)}")

block setTest2:
  var t = initSet[string]()
  t.incl("test")
  t.incl("111")
  t.incl("123")
  t.excl("111")
  
  t.incl("012")
  t.incl("123") # test duplicates
  
  assert "123" in t
  assert "111" notin t # deleted
  
  for key in items(data): t.incl(key)
  for key in items(data): assert key in t
  

block orderedSetTest1:
  var t = data.toOrderedSet
  for key in items(data): assert key in t
  var i = 0
  # `items` needs to yield in insertion order:
  for key in items(t):
    assert key == data[i]
    inc(i)

echo "true"