f35805c2c5/test/library/hash_and_aa/aa-test.retro

e42c7ed4519520155d7f614052f669b4479ad9d0f35805c2c56c0dc7b89bf5c8b341f450093fa7c9
38
      %h1 @" not there!" .? cr
38
      %h1 @" not there!" .? cr
39
    ;
39
    ;
40
  }}
40
  }}
41
42
    : new-hash: new-hash constant ;
43
    new-hash: h1
44
    new-hash: h2
45
46
    h1 %{ x = 10 }%
47
    h1 %{ y = 20 }%
48
    h1 %{ z = 30 }%
49
    h1 %{ more = " hello" keepString }%
50
51
    ( Be careful with visual alignment; leading spaces are   )
52
    ( part of the key string...                              )
53
    h2   %{ one = 1 }%
54
    h2   %{ two = 2 }%
55
    h2 %{ three = 3 }%
56
57
    ( NOTE: these operations are expensive: )
58
    : t1 h1 .keys ;
59
    : t2 h1 .table ;
60
    : t3 h2 .keys ;
61
    : t4 h2 .table ;
41
))
62
))
42
63
43
( ~~[ Testing ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ )
64
( ~~[ Testing ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ )
44
65
45
clear aa.tests
66
clear aa.tests t1 t2 t3 t4
46
67
47
' associative-tests shut
68
' associative-tests shut
48
' associative shut
69
' associative shut