[svn:parrot] r47353 - trunk/t/pmc

NotFound at svn.parrot.org NotFound at svn.parrot.org
Fri Jun 4 15:10:12 UTC 2010


Author: NotFound
Date: Fri Jun  4 15:10:11 2010
New Revision: 47353
URL: https://trac.parrot.org/parrot/changeset/47353

Log:
tests for FIA get_repr and is_equal to different type

Modified:
   trunk/t/pmc/fixedintegerarray.t

Modified: trunk/t/pmc/fixedintegerarray.t
==============================================================================
--- trunk/t/pmc/fixedintegerarray.t	Fri Jun  4 12:36:57 2010	(r47352)
+++ trunk/t/pmc/fixedintegerarray.t	Fri Jun  4 15:10:11 2010	(r47353)
@@ -19,7 +19,7 @@
 
 .sub 'main' :main
     .include 'test_more.pir'
-    plan(33)
+    plan(35)
 
     test_set_size()
     test_reset_size()
@@ -31,6 +31,7 @@
     test_interface_done()
     test_get_iter()
     test_equality()
+    test_repr()
     test_new_style_init()
     test_invalid_init_tt1509()
 .end
@@ -227,7 +228,7 @@
 .end
 
 .sub 'test_equality'
-    .local pmc a1, a2
+    .local pmc a1, a2, a3
     a1 = new ['FixedIntegerArray']
     a2 = new ['FixedIntegerArray']
 
@@ -247,6 +248,20 @@
 
     a2[1] = 84
     is(a1, a2, "Equal when second element same")
+
+    a3 = new ['Complex']
+    isnt(a1, a3, "Different PMC type is not equal")
+.end
+
+.sub 'test_repr'
+    .local pmc a1
+    .local string r
+    a1 = new ['FixedIntegerArray']
+    a1 = 2
+    a1[0] = 7
+    a1[1] = 1
+    r = get_repr a1
+    like(r, '[\s*7\s*\,\s*1\s*]', 'get_repr')
 .end
 
 .sub 'test_new_style_init'


More information about the parrot-commits mailing list