Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[t/spec]: unfudge some tests relating to Inf/NaN .

git-svn-id: http://svn.pugscode.org/pugs@24546 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit e596d2cd56e4d722c51fb75f0cfdddbeebc5f61d 1 parent b194db4
pmichaud authored
View
26 S02-builtin_data_types/infinity.t
@@ -4,33 +4,33 @@ plan 8;
# L<S02/"Built-In Data Types" /Perl 6 should by default make standard IEEE floating point concepts visible>
-#?rakudo skip 'Parse Error: Statement not terminated properly'
{
my $x = Inf;
-
- cmp_ok( $x, &infix:<==>, Inf, 'numeric equal' );
- cmp_ok( $x, &infix:<eq>, 'Inf', 'string equal' );
+
+ ok( $x == Inf , 'numeric equal');
+ #?rakudo skip 'Inf stringification'
+ ok( $x eq 'Inf', 'string equal');
}
-#?rakudo skip 'Parse Error: Statement not terminated properly'
{
my $x = -Inf;
- cmp_ok( $x, &infix:<==>, -Inf, 'negative numeric equal' );
- cmp_ok( $x, &infix:<eq>, '-Inf', 'negative string equal' );
+ ok( $x == -Inf, 'negative numeric equal' );
+ #?rakudo skip 'Inf stringification'
+ ok( $x eq '-Inf', 'negative string equal' );
}
-#?rakudo skip 'Parse Error: Statement not terminated properly'
+#?rakudo todo 'integer Inf'
{
my $x = int( Inf );
- cmp_ok( $x, &infix:<==>, Inf, 'int numeric equal' );
- cmp_ok( $x, &infix:<eq>, 'Inf', 'int string equal', :todo<bug> );
+ ok( $x == Inf, 'int numeric equal' );
+ ok( $x eq 'Inf', 'int string equal' );
}
-#?rakudo skip 'Parse Error: Statement not terminated properly'
+#?rakudo todo 'integer Inf'
{
my $x = int( -Inf );
- cmp_ok( $x, &infix:<==>, -Inf, 'int negative numeric equal');
- cmp_ok( $x, &infix:<eq>, '-Inf', 'int negative string equal', :todo<bug> );
+ ok( $x == -Inf, 'int numeric equal' );
+ ok( $x eq '-Inf', 'int string equal' );
}
# Inf should == Inf. Additionally, Inf's stringification (~Inf), "Inf", should
View
3  S03-operators/arith.t
@@ -316,7 +316,6 @@ is_approx 2.2**2.2, 5.66669577875008;
is 1**0, 1;
is 1**1, 1;
-#?rakudo skip 'Inf, NaN'
{
# Inf
is Inf, Inf;
@@ -348,7 +347,6 @@ is 1**1, 1;
}
# See L<"http://mathworld.wolfram.com/Indeterminate.html">
# for why these three values are defined like they are.
-#?rakudo skip 'Inf, NaN'
{
is 0.9**Inf, 0, "0.9**Inf converges towards 0";
is 1.1**Inf, Inf, "1.1**Inf diverges towards Inf";
@@ -357,7 +355,6 @@ is 1**1, 1;
#flunk("1**Inf is platform-specific -- it's 1 on OSX and NaN elsewhere", :todo);
-#?rakudo skip 'Inf, NaN'
{
# NaN
is NaN, NaN;
View
1  S03-operators/context-forcers.t
@@ -41,7 +41,6 @@ plan 99;
is +"0", 0, "+ context forcer works (4)";
is +"", 0, "+ context forcer works (5)";
is +undef, 0, "+ context forcer works (6)";
- #?rakudo 3 skip 'Inf/NaN in numeric context'
is +"Inf", Inf, "+ context forcer works (7)";
is +"-Inf", -Inf, "+ context forcer works (8)";
is +"NaN", NaN, "+ context forcer works (9)";
View
7 S03-operators/numeric-context.t
@@ -10,18 +10,13 @@ is(+'0000', 0, "+'0000' is 0");
is(+'000a', 0, "+'000a' is 0 (illegal number)");
is(+'1.9e3', 1900, "+'1.9e3' is 1900");
-#?rakudo skip "Inf"
is(+'Inf', Inf, "+'Inf' is Inf");
is(+'Info', 0, "+'Info' is 0");
-#?rakudo skip "Inf"
is(+'-Inf', -Inf, "+'-Inf' is -Inf");
-#?rakudo todo "Inf"
is(+'-Info', 0, "+'-Info' is 0");
-#?rakudo skip "NaN"
is(+'NaN', NaN, "+'NaN' is NaN");
is(+'NaNa', 0, "+'NaNa' is 0");
-#?rakudo skip 'Tests need specs first'
{
# XXX Not sure whether the following tests are correct
is(+'Inf ', Inf, "numification of strings with whitspace (1)");
@@ -48,7 +43,7 @@ is(+'aInfo', 0, "+'aInfo' is 0");
is(+'aNaN', 0, "+'aNaN' is 0");
is(+'aNaNa', 0, "+'aNaNa' is 0");
-#?rakudo 4 skip 'Inf and NaN'
+#?rakudo 2 skip 'Inf and NaN'
is( Inf, 'Inf', "'Inf' is Inf");
is(-Inf, '-Inf', "'-Inf' is -Inf");
Please sign in to comment.
Something went wrong with that request. Please try again.