print "# Failed $where\n";
}
$test++;
+
+ return $pass;
}
sub _where {
_ok($pass, _where(), @mess);
}
-sub _expect {
- my ($got, $pass, @mess) = @_;
- if ($pass) {
- ok(1, @mess);
- } else {
- ok(0, @mess);
- }
-}
-
sub is {
my ($got, $expected, @mess) = @_;
my $pass = $got eq $expected;
"# got '$got'\n",
"# expected '$expected'\n");
}
- _expect($pass, _where(), @mess);
+ _ok($pass, _where(), @mess);
}
# Note: this isn't quite as fancy as Test::More::like().
"# expected /$expected/\n");
}
}
- _expect($pass, _where(), @mess);
+ _ok($pass, _where(), @mess);
}
sub pass {
eval <<REQUIRE_OK;
require $require;
REQUIRE_OK
- ok(!$@, "require $require");
+ _ok(!$@, _where(), "require $require");
}
sub use_ok {
eval <<USE_OK;
use $use;
USE_OK
- ok(!$@, "use $use");
+ _ok(!$@, _where(), "use $use");
}
1;