mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
cleaning up tests
This commit is contained in:
21
scripts/test/index-dictionaries.toy
Normal file
21
scripts/test/index-dictionaries.toy
Normal file
@@ -0,0 +1,21 @@
|
||||
//test basic insertion
|
||||
{
|
||||
var d = [:];
|
||||
|
||||
d["foo"] = "bar";
|
||||
|
||||
assert d == ["foo":"bar"], "basic insertion failed";
|
||||
}
|
||||
|
||||
|
||||
//test dot insertion
|
||||
{
|
||||
var d = [:];
|
||||
|
||||
d.foo = "bar";
|
||||
|
||||
assert d == ["foo":"bar"], "dot insertion failed";
|
||||
}
|
||||
|
||||
|
||||
print "All good";
|
||||
Reference in New Issue
Block a user