Fix UV_SIZEOF to UVSIZE; change the overflow tests
[p5sagit/p5-mst-13.2.git] / t / pragma / overload.t
index da85771..ff8d805 100755 (executable)
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    @INC = '../lib';
+    unshift @INC, '../lib';
 }
 
 package Oscalar;
@@ -778,8 +778,8 @@ test($c, "bareword");       # 135
   test "@sorted", '22 11 5 2 1'; # 189
   # Scalar
   test $$deref, 123;           # 190
-  # Glob
-  @sorted = sort $deref 11, 2, 5, 1, 22;
+  # Code
+  @sorted = sort $srt 11, 2, 5, 1, 22;
   test "@sorted", '22 11 5 2 1'; # 191
   # Array
   test "@$deref", '11 12 13';  # 192
@@ -899,5 +899,22 @@ test $bar->{two}, 11;              # 205
 $bar->{three} = 13;
 test $bar->[3], 13;            # 206
 
+{
+  package B;
+  use overload bool => sub { ${+shift} };
+}
+
+my $aaa;
+{ my $bbbb = 0; $aaa = bless \$bbbb, B }
+
+test !$aaa, 1;
+
+unless ($aaa) {
+  test 'ok', 'ok';
+} else {
+  test 'is not', 'ok';
+}
+
+
 # Last test is:
-sub last {206}
+sub last {208}