[svn:parrot] r47540 - trunk/t/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Thu Jun 10 16:58:17 UTC 2010
Author: NotFound
Date: Thu Jun 10 16:58:17 2010
New Revision: 47540
URL: https://trac.parrot.org/parrot/changeset/47540
Log:
test FIA sort
Modified:
trunk/t/pmc/fixedintegerarray.t
Modified: trunk/t/pmc/fixedintegerarray.t
==============================================================================
--- trunk/t/pmc/fixedintegerarray.t Thu Jun 10 16:51:29 2010 (r47539)
+++ trunk/t/pmc/fixedintegerarray.t Thu Jun 10 16:58:17 2010 (r47540)
@@ -19,7 +19,7 @@
.sub 'main' :main
.include 'test_more.pir'
- plan(35)
+ plan(36)
test_set_size()
test_reset_size()
@@ -32,6 +32,7 @@
test_get_iter()
test_equality()
test_repr()
+ test_sort()
test_new_style_init()
test_invalid_init_tt1509()
.end
@@ -271,6 +272,23 @@
is($I0, 10, "New style init creates the correct # of elements")
.end
+.sub 'test_sort'
+ .local pmc a1, a2
+ a1 = new ['FixedIntegerArray'], 3
+ a1[0] = 7
+ a1[1] = 1
+ a1[2] = 5
+
+ a2 = new ['FixedIntegerArray'], 3
+ a2[0] = 1
+ a2[1] = 5
+ a2[2] = 7
+
+ a1.'sort'()
+ $I0 = iseq a1, a2
+ is($I0, 1, 'default sort')
+.end
+
.sub test_invalid_init_tt1509
throws_substring(<<'CODE', 'FixedIntegerArray: Cannot set array size to a negative number (-10)', 'New style init does not dump core for negative array lengths')
.sub main
@@ -285,6 +303,8 @@
CODE
.end
+
+
# Local Variables:
# mode: pir
# fill-column: 100
More information about the parrot-commits
mailing list