Created
June 6, 2013 22:18
-
-
Save colomon/5725455 to your computer and use it in GitHub Desktop.
Tests for the behavior of .Set.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
isa_ok "a".Set, Set, "Str.Set makes a Set"; | |
is showset("a".Set), 'a', "'a'.Set is set a"; | |
isa_ok (a => 1).Set, Set, "Pair.Set makes a Set"; | |
is showset((a => 1).Set), 'a', "(a => 1).Set is set a"; | |
is showset((a => 0).Set), '', "(a => 0).Set is the empty set"; | |
isa_ok <a b c>.Set, Set, "<a b c>.Set makes a Set"; | |
is showset(<a b c a>.Set), 'a b c', "<a b c a>.Set makes the set a b c"; | |
is showset(["a", "b", "c", "a"].Set), 'a b c', "[a b c a].Set makes the set a b c"; | |
is showset([a => 3, b => 0, 'c', 'a'].Set), 'a c', "[a => 3, b => 0, 'c', 'a'].Set makes the set a c"; | |
isa_ok {a => 2, b => 4, c => 0}.Set, Set, "{a => 2, b => 4, c => 0}.Set makes a Set"; | |
is showset({a => 2, b => 4, c => 0}.Set), 'a b', "{a => 2, b => 4, c => 0}.Set makes the set a b"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment