Commits

Toby Inkster committed d230769

given/when test (todo)

Comments (0)

Files changed (1)

t/20-unit/Type-Tiny/smartmatch.t

 ok( 42 ~~ \&is_Int );
 ok not( 42 ~~ \&is_ArrayRef );
 
+TODO: {
+	use feature qw(switch);
+	local $TODO = 'this would be nice, but probably requires changes to perl';
+	given (4) {
+		when ( RegexpRef ) { fail('regexpref') }
+		when ( Int )       { pass('int') }
+		default            { fail('default') }
+	}
+};
+
 done_testing;