Skip to content

Instantly share code, notes, and snippets.

@ab5tract
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ab5tract/572342901a4561c53dbc to your computer and use it in GitHub Desktop.
Save ab5tract/572342901a4561c53dbc to your computer and use it in GitHub Desktop.
failing test for quanthash sym dif
use Test;
plan 5;
my $s = Set.new( <w x y z> );
my $sh = SetHash.new( <x y z> );
my $b = ( w => 1, x => 2, y => 3, z => 4 ).Bag;
my $bh = ( x => 1, y => 2, z => 33 ).BagHash;
is ($s (^+) $b ), (x => 1, y => 2, z => 3).Bag, "(^+) - {$s.gist} (^+) {$b.gist} == {(x => 1, y => 2, z => 3).Bag}";
is ($b (^+) $s ), (x => 1, y => 2, z => 3).Bag, "(^+) - {$b.gist} (^+) {$s.gist} == {(x => 1, y => 2, z => 3).Bag}";
is ($s (^+) $bh), (w => 1, y => 1, z => 2).Bag, "(^+) - {$s.gist} (^+) {$bh.gist == {(w => 1, y => 1, z => 2).Bag}";
is ($bh (^+) $s ), (w => 1, y => 1, z => 2).Bag, "(^+) - {$bh.gist} (^+) {$s.gist} == {(w => 1, y => 1, z => 2).Bag}";
# LoL fails too
is ([(^+)] $s,$b,$bh), ( z => 28 ).Bag,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment