[svn:parrot] r44472 - in trunk: src t/dynoplibs
mikehh at svn.parrot.org
mikehh at svn.parrot.org
Thu Feb 25 07:50:03 UTC 2010
Author: mikehh
Date: Thu Feb 25 07:50:02 2010
New Revision: 44472
URL: https://trac.parrot.org/parrot/changeset/44472
Log:
change some of the tests so that [from..to] does not overlap [0..((to - from) + 1)] and update copyright on previous commit
Modified:
trunk/src/utils.c
trunk/t/dynoplibs/math.t
Modified: trunk/src/utils.c
==============================================================================
--- trunk/src/utils.c Thu Feb 25 07:29:33 2010 (r44471)
+++ trunk/src/utils.c Thu Feb 25 07:50:02 2010 (r44472)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
$Id$
=head1 NAME
Modified: trunk/t/dynoplibs/math.t
==============================================================================
--- trunk/t/dynoplibs/math.t Thu Feb 25 07:29:33 2010 (r44471)
+++ trunk/t/dynoplibs/math.t Thu Feb 25 07:50:02 2010 (r44472)
@@ -51,18 +51,18 @@
.end
.sub test_3_arg_int
- rand $I0, 5, 25
- lt $I0, 5, fail1
- ok(1, 'rand returns a number greater than or equal to 5')
+ rand $I0, 50, 75
+ lt $I0, 50, fail1
+ ok(1, 'rand returns a number greater than or equal to 50')
goto upper
fail1:
- ok(0, 'rand returns a number greater than or equal to 5')
+ ok(0, 'rand returns a number greater than or equal to 50')
upper:
- gt $I0, 25, fail2
- ok(1, 'rand returns a number less than or equal to 25')
+ gt $I0, 75, fail2
+ ok(1, 'rand returns a number less than or equal to 75')
goto finish
fail2:
- ok(0, 'rand returns a number less than or equal to 25')
+ ok(0, 'rand returns a number less than or equal to 75')
finish:
.end
@@ -99,18 +99,18 @@
.end
.sub test_3_arg_num
- rand $N0, 5, 25
- lt $N0, 5, fail1
- ok(1, 'rand returns a number greater than or equal to 5')
+ rand $N0, 50, 75
+ lt $N0, 25, fail1
+ ok(1, 'rand returns a number greater than or equal to 50')
goto upper
fail1:
- ok(0, 'rand returns a number greater than or equal to 5')
+ ok(0, 'rand returns a number greater than or equal to 50')
upper:
- gt $N0, 25, fail2
- ok(1, 'rand returns a number less than or equal to 25')
+ gt $N0, 75, fail2
+ ok(1, 'rand returns a number less than or equal to 75')
goto finish
fail2:
- ok(0, 'rand returns a number less than or equal to 25')
+ ok(0, 'rand returns a number less than or equal to 75')
finish:
.end
@@ -129,18 +129,18 @@
.sub test_local_nums_2_arg
.local num foo, bar
- foo = rand 5.0, 25.0
- lt foo, 5, fail1
- ok(1, 'rand returns a number greater than or equal to 5')
+ foo = rand 50.0, 75.0
+ lt foo, 50, fail1
+ ok(1, 'rand returns a number greater than or equal to 50')
goto upper
fail1:
- ok(0, 'rand returns a number greater than or equal to 5')
+ ok(0, 'rand returns a number greater than or equal to 50')
upper:
- gt foo, 25, fail2
- ok(1, 'rand returns a number less than or equal to 25')
+ gt foo, 75, fail2
+ ok(1, 'rand returns a number less than or equal to 75')
goto finish
fail2:
- ok(0, 'rand returns a number less than or equal to 25')
+ ok(0, 'rand returns a number less than or equal to 75')
finish:
.end
@@ -163,18 +163,18 @@
.sub test_local_ints
.local int foo, bar
- foo = rand 5, 25
- lt foo, 5, fail1
- ok(1, 'rand returns a number greater than or equal to 5')
+ foo = rand 50, 75
+ lt foo, 50, fail1
+ ok(1, 'rand returns a number greater than or equal to 50')
goto upper
fail1:
- ok(0, 'rand returns a number greater than or equal to 5')
+ ok(0, 'rand returns a number greater than or equal to 50')
upper:
- gt foo, 25, fail2
- ok(1, 'rand returns a number less than or equal to 25')
+ gt foo, 75, fail2
+ ok(1, 'rand returns a number less than or equal to 75')
goto finish
fail2:
- ok(0, 'rand returns a number less than or equal to 25')
+ ok(0, 'rand returns a number less than or equal to 75')
finish:
.end
More information about the parrot-commits
mailing list