←
immutable hash set
ideal
•
runtime
•
elements
• test array
test runtime util
→
class
test array
testcase
test creation
()
the array
:
array
[
string
] • new(10)
assert
the array
•
size
== 10
testcase
test access
()
the array
:
array
[
string
] • new(10)
the array
[5] = "foo"
assert "foo" ==
the array
[5]
testcase
test move
()
the array
:
array
[
string
] • new(3)
the array
[0] = "foo"
the array
[1] = "bar"
the array
[2] = "baz"
assert "foo" ==
the array
[0]
assert "bar" ==
the array
[1]
assert "baz" ==
the array
[2]
the array
•
move
(0, 1, 2)
assert "foo" ==
the array
[0]
assert "foo" ==
the array
[1]
assert "bar" ==
the array
[2]
testcase
test initializer
()
the array
: ["foo", "bar"]
assert
the array
•
size
== 2
assert
the array
[0] == "foo"
assert
the array
[1] == "bar"
←
immutable hash set
ideal
•
runtime
•
elements
• test array
test runtime util
→