This test is pretty useless as it stands.
[p5sagit/p5-mst-13.2.git] / lib / Benchmark.t
index 60caf43..36bccd7 100644 (file)
@@ -292,8 +292,8 @@ sub check_graph_consistency {
     (my $fastslow = $fastslowt) =~ s!%!!;
     if ($slowrate < $fastrate) {
         pass ("slow rate is less than fast rate");
-        unless (ok ($slowfast < 0 && $slowfast >= -100,
-                    "slowfast should be less than zero, and >= -100")) {
+        unless (ok ($slowfast <= 0 && $slowfast >= -100,
+                    "slowfast should be less than or equal to zero, and >= -100")) {
           print STDERR "# slowfast $slowfast\n";
           $all_passed = 0;
         }
@@ -305,10 +305,12 @@ sub check_graph_consistency {
         $all_passed
           &= is ($slowrate, $fastrate,
                  "slow rate isn't less than fast rate, so should be the same");
+       # In OpenBSD the $slowfast is sometimes a really, really, really
+       # small number less than zero, and this gets stringified as -0.
         $all_passed
-          &= is ($slowfast, 0, "slowfast should be zero");
+          &= like ($slowfast, qr/^-?0$/, "slowfast should be zero");
         $all_passed
-          &= is ($fastslow, 0, "fastslow should be zero");
+          &= like ($fastslow, qr/^-?0$/, "fastslow should be zero");
     }
     return $all_passed;
 }