develooper Front page | perl.perl6.internals | Postings from January 2002

[PATCH] Better neg op tests

From:
Simon Glover
Date:
January 29, 2002 06:58
Subject:
[PATCH] Better neg op tests
Message ID:
Pine.OSF.4.10.10201291454060.341424-100000@arran.roe.ac.uk

 As written, the tests of the new neg op will pass even if neg does
 nothing. Enclosed patch fixes by extending the tests.

 Simon

--- integer.t.old	Tue Jan 29 14:48:54 2002
+++ integer.t	Tue Jan 29 14:49:51 2002
@@ -1014,11 +1014,14 @@
 
 output_is(<<CODE, <<OUTPUT, "neg_i");
     neg I0,3
+    print I0
+    print "\\n"
     neg I0,I0
     print I0
     print "\\n"
     end
 CODE
+-3
 3
 OUTPUT

 
--- number.t.old	Tue Jan 29 14:57:27 2002
+++ number.t	Tue Jan 29 14:52:43 2002
@@ -858,11 +858,14 @@
 
 output_is(<<CODE, <<OUTPUT, "neg_n");
     neg N0,3.0
+    print N0
+    print "\\n"
     neg N0,N0
     print N0
     print "\\n"
     end
 CODE
+-3.000000
 3.000000
 OUTPUT
 
 




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About