[svn:parrot] r47103 - in trunk/t: dynoplibs pmc
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Sat May 29 07:02:52 UTC 2010
Author: plobsing
Date: Sat May 29 07:02:52 2010
New Revision: 47103
URL: https://trac.parrot.org/parrot/changeset/47103
Log:
move transcendental testing on Complex PMC to dynops testing
Modified:
trunk/t/dynoplibs/trans.t
trunk/t/pmc/complex.t
Modified: trunk/t/dynoplibs/trans.t
==============================================================================
--- trunk/t/dynoplibs/trans.t Sat May 29 06:50:09 2010 (r47102)
+++ trunk/t/dynoplibs/trans.t Sat May 29 07:02:52 2010 (r47103)
@@ -23,7 +23,7 @@
.local num epsilon
epsilon = _epsilon()
- plan(68)
+ plan(69)
test_sin_n(epsilon)
test_sin_i(epsilon)
@@ -44,6 +44,7 @@
test_cosh_n(epsilon)
test_cosh_i(epsilon)
integer_overflow_with_pow()
+ e_raised_pi_time_i__plus_1_equal_0()
.end
.sub _pi
@@ -283,6 +284,27 @@
end:
.end
+.macro sprintf_is(fmt, number, message)
+ c = .number
+ $S0 = sprintf .fmt, c
+ $S1 = .message
+ is( $S0, $S1, $S1 )
+.endm
+
+.sub e_raised_pi_time_i__plus_1_equal_0
+ .local pmc c, c2, c3
+ c = new ['Complex']
+ c2 = new ['Complex']
+ c3 = new ['Complex']
+ # e^(pi * i) + 1 = 0
+ $N0 = atan 1
+ $N0 *= 4
+ c[0] = 0.0
+ c[1] = $N0
+ c2 = c.'exp'()
+ c2 += 1.0
+ .sprintf_is( "%.3f%+.3fi", c2, "0.000+0.000i" )
+.end
# Local Variables:
# mode: pir
Modified: trunk/t/pmc/complex.t
==============================================================================
--- trunk/t/pmc/complex.t Sat May 29 06:50:09 2010 (r47102)
+++ trunk/t/pmc/complex.t Sat May 29 07:02:52 2010 (r47103)
@@ -16,14 +16,12 @@
=cut
-.loadlib 'trans_ops'
-
.sub main :main
.include 'test_more.pir'
.include 'fp_equality.pasm'
.include "iglobals.pasm"
- plan(459)
+ plan(458)
string_parsing()
exception_malformed_string__real_part()
@@ -56,7 +54,6 @@
test_sub()
test_i_sub()
sprintf_with_a_complex()
- e_raised_pi_time_i__plus_1_equal_0()
ln_of_complex_numbers()
exp_of_complex_numbers()
sqrt_of_complex_numbers()
@@ -651,21 +648,6 @@
.sprintf_is( "%.3f%+.3fi", "0+i", "0.000+1.000i" )
.end
-.sub e_raised_pi_time_i__plus_1_equal_0
- .local pmc c, c2, c3
- c = new ['Complex']
- c2 = new ['Complex']
- c3 = new ['Complex']
- # e^(pi * i) + 1 = 0
- $N0 = atan 1
- $N0 *= 4
- c[0] = 0.0
- c[1] = $N0
- c2 = c.'exp'()
- c2 += 1.0
- .sprintf_is( "%.3f%+.3fi", c2, "0.000+0.000i" )
-.end
-
# # The inverse hyperbolic functions are broken wrt -0.0
# # Need to find some formal spec for when to return -0.0.
More information about the parrot-commits
mailing list