Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t/spec] Fix up for new hyper rules, unfudge tests that now work.

git-svn-id: http://svn.pugscode.org/pugs@31080 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 07399299a5843f8d90cfc33e63121977d51284a9 1 parent e51f5a7
colomon authored
Showing with 17 additions and 3 deletions.
  1. +16 −2 S03-metaops/hyper.t
  2. +1 −1  integration/advent2009-day06.t
View
18 S03-metaops/hyper.t
@@ -110,8 +110,15 @@ my @e;
is(~@r, ~@e, "auto dimension upgrade on lhs ASCII notation");
}
-#?rakudo todo 'list level extension'
{ # extension
+ @r = (1,2,3,4) >>~>> <A B C D E>;
+ @e = <1A 2B 3C 4D>;
+ is(~@r, ~@e, "list-level element truncate on rhs ASCII notation");
+
+ @r = (1,2,3,4,5) <<~<< <A B C D>;
+ @e = <1A 2B 3C 4D>;
+ is(~@r, ~@e, "list-level element truncate on lhs ASCII notation");
+
@r = (1,2,3,4) >>~>> <A B C>;
@e = <1A 2B 3C 4A>;
is(~@r, ~@e, "list-level element extension on rhs ASCII notation");
@@ -145,8 +152,15 @@ my @e;
is(~@r, ~@e, "scalar element extension on lhs ASCII notation");
};
-#?rakudo todo 'unicode hypers'
{ # dimension upgrade - unicode
+ @r = (1,2,3,4) »~» <A B C D E>;
+ @e = <1A 2B 3C 4D>;
+ is(~@r, ~@e, "list-level element truncate on rhs unicode notation");
+
+ @r = (1,2,3,4,5) «~« <A B C D>;
+ @e = <1A 2B 3C 4D>;
+ is(~@r, ~@e, "list-level element truncate on lhs unicode notation");
+
@r = (1,2,3,4) »~» <A B C>;
@e = <1A 2B 3C 4A>;
is(~@r, ~@e, "list-level element extension on rhs unicode notation");
View
2  integration/advent2009-day06.t
@@ -15,7 +15,7 @@ my @pi-sin = @pi>>.sin;
is (@a <<+>> @c), [4, 3, 6, 5], 'Dwimmy hyperoperator on arrays of the same length';
is (@a >>+<< @c), [4, 3, 6, 5], 'Non-dwimmy hyperoperator on arrays of the same length';
-is (@a <<+>> @b), [4, 3, 4, 5], 'Dwimmy hyperoperator on arrays of different size';
+is (@a <<+>> @b), [4, 3, 6, 5], 'Dwimmy hyperoperator on arrays of different size';
dies_ok {@a >>+<< @b}, 'Non-dwimmy hyperoperator on arrays of different size fails';
is (@a >>+>> 2), [3, 4, 5, 6], 'Single scalars extend to the right';
is (3 <<+<< @a), [4, 5, 6, 7], 'Single scalars extend to the left';
Please sign in to comment.
Something went wrong with that request. Please try again.