[svn:parrot] r35693 - in trunk: src/pmc t/pmc

[email protected]
Newsgroups perl.cvs.parrot
Message-ID <[email protected]>
Author: infinoid
Date: Sat Jan 17 08:01:20 2009
New Revision: 35693

Modified:
   trunk/src/pmc/float.pmc
   trunk/t/pmc/float.t

Log:
[float] Fix the acos() method.  Un-todo the test.  (TT #184)

Modified: trunk/src/pmc/float.pmc
==============================================================================
--- trunk/src/pmc/float.pmc	(original)
+++ trunk/src/pmc/float.pmc	Sat Jan 17 08:01:20 2009
@@ -472,7 +472,7 @@
 
     METHOD acos() {
         PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-        SET_ATTR_fv(INTERP, SELF, acos(SELF.get_number()));
+        SET_ATTR_fv(INTERP, d, acos(SELF.get_number()));
         RETURN(PMC *d);
     }
 

Modified: trunk/t/pmc/float.t
==============================================================================
--- trunk/t/pmc/float.t	(original)
+++ trunk/t/pmc/float.t	Sat Jan 17 08:01:20 2009
@@ -1132,7 +1132,7 @@
 1
 OUTPUT
 
-pir_output_is( <<'CODE', <<'OUTPUT', 'acos as a method', todo => 'TT #184' );
+pir_output_is( <<'CODE', <<'OUTPUT', 'acos as a method' );
 .include 'fp_equality.pasm'
 .sub main :main
     $P0 = new ['Float']
@@ -1148,16 +1148,16 @@
     $P2 = new ['Float']
     $P2 = 0.5
     $P3 = $P2.'acos'()
-    .fp_eq($P3, 1.0471975511966, OK2)
+    .fp_eq($P3, 1.04719755, OK2)
     print 'got '
     print $P3
     print ' but '
   OK2:
-    say 'result should be 1.0471975511966'
+    say 'result should be 1.04719755'
 .end
 CODE
-result should be 0.0
-result should be 1.0471975511966
+result should be 1.57079632
+result should be 1.04719755
 OUTPUT
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.