Permalink
Browse files

Add a bunch of binding tests to spectest.data

  • Loading branch information...
1 parent 9850df9 commit 4024e229df29ff60c955c2918fad814d51d80e9f @sorear committed Jun 26, 2011
Showing with 7 additions and 0 deletions.
  1. +1 −0 lib/CORE.setting
  2. +2 −0 lib/Test.pm6
  3. +4 −0 t/spectest.data
View
@@ -860,6 +860,7 @@ my class Hash {
method kv() { Q:CgOp { (hash_kv {self}) } }
method Numeric() { +@(self) }
+ method Str() { @(self).map(* ~ "\n").join }
method invert() {
my %new;
View
@@ -76,6 +76,7 @@ $GLOBAL::TEST-BUILDER.reset;
sub ok(\$bool, $tag?) is export { $*TEST-BUILDER.ok(?$bool, $tag) }
sub nok(\$bool, $tag?) is export { $*TEST-BUILDER.ok(!$bool, $tag) }
+sub skip_rest($tag?) is export { } #OK
sub pass($tag?) is export { $*TEST-BUILDER.ok(1, $tag); True }
sub flunk($tag?) is export { $*TEST-BUILDER.ok(0, $tag) }
sub isa_ok(Mu $obj, Mu $type, $tag?) is export { $*TEST-BUILDER.ok($obj.^isa($type), $tag) }
@@ -122,6 +123,7 @@ sub eval_lives_ok($*code, $why?) is export {
try { ?NoControlEval; $lived = True; }
$*TEST-BUILDER.ok($lived, $why);
}
+sub diag($str) is export { $*TEST-BUILDER.note($str) }
sub is_approx(Mu $got, Mu $expected, $desc = '') is export {
my $test = ($got - $expected).abs <= 1/100000;
$*TEST-BUILDER.ok(?$test, $desc);
View
@@ -34,6 +34,10 @@ S03-metaops/hyper.t
S03-metaops/not.t
S03-metaops/reduce.t
S03-operators/assign-is-not-binding.t
+S03-operators/binding-arrays.t
+S03-operators/binding-closure.t
+S03-operators/binding-hashes.t
+S03-operators/binding-nested.t
S03-operators/binding-scalars.t
S03-operators/bit.t
S03-operators/chained-declarators.t

0 comments on commit 4024e22

Please sign in to comment.