t/op/rxcode.t See if /(?{ code })/ works
t/op/sleep.t See if sleep works
t/op/smartmatch.t See if the ~~ operator works
+t/op/smobj.t See how the ~~ operator works with overloading
t/op/sort.t See if sort works
t/op/splice.t See if splice works
t/op/split.t See if split works
--- /dev/null
+#!./perl
+
+BEGIN {
+ chdir 't';
+ @INC = '../lib';
+ require './test.pl';
+}
+
+plan tests => 5;
+
+use strict;
+use warnings;
+
+{
+ package Test::Object::NoOverload;
+ sub new { bless { key => 1 } }
+}
+
+{
+ my $obj = Test::Object::NoOverload->new;
+ isa_ok($obj, 'Test::Object::NoOverload');
+ my $r = eval { ($obj ~~ 'key') };
+
+ local $::TODO = 'To be implemented';
+
+ ok(
+ ! defined $r,
+ "we do not smart match against an object's underlying implementation",
+ );
+
+ like(
+ $@,
+ qr/overload/,
+ "we die when smart matching an obj with no ~~ overload",
+ );
+}
+
+{
+ package Test::Object::CopyOverload;
+ sub new { bless { key => 1 } }
+ use overload '~~' => sub { my %hash = %{ $_[0] }; %hash ~~ $_[1] };
+}
+
+{
+ my $obj = Test::Object::CopyOverload->new;
+ isa_ok($obj, 'Test::Object::CopyOverload');
+ ok($obj ~~ 'key', 'we are able to make an object ~~ overload');
+}