This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make the tests 1018 and 1019 more robust.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 14 Mar 2000 15:13:13 +0000 (15:13 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 14 Mar 2000 15:13:13 +0000 (15:13 +0000)
p4raw-id: //depot/cfgperl@5729

t/lib/complex.t

index bd30e7e..b095e29 100755 (executable)
@@ -264,7 +264,7 @@ EOS
     $test++;
     push @script, <<EOS;
     print "# j = \$j\n";
-    print "not " unless "\$j" eq "-0.5+0.866025403784439i";
+    print "not " unless "\$j" =~ /^\Q-0.5+0.86602540\E\d+i$/;
     print "ok $test\n";
 
     \$j->display_format('style' => 'polar', 'polar_pretty_print' => 0);
@@ -273,7 +273,7 @@ EOS
     $test++;
     push @script, <<EOS;
     print "# j = \$j\n";
-    print "not " unless "\$j" eq "[1,2.0943951023932]";
+    print "not " unless "\$j" =~ /^\Q[1,2.09439510\E\d+]$/;
     print "ok $test\n";
 
     \$j->display_format('style' => 'cartesian', 'format' => '(%.5g)');