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

NotFound at svn.parrot.org NotFound at svn.parrot.org
Wed Feb 24 22:24:43 UTC 2010


Author: NotFound
Date: Wed Feb 24 22:24:43 2010
New Revision: 44466
URL: https://trac.parrot.org/parrot/changeset/44466

Log:
some more oplib testing

Modified:
   trunk/t/pmc/oplib.t

Modified: trunk/t/pmc/oplib.t
==============================================================================
--- trunk/t/pmc/oplib.t	Wed Feb 24 22:05:27 2010	(r44465)
+++ trunk/t/pmc/oplib.t	Wed Feb 24 22:24:43 2010	(r44466)
@@ -14,8 +14,10 @@
 
 .sub main :main
     .include 'test_more.pir'
-    plan(1)
+    plan(3)
     new_oplib()
+    get_end()
+    get_no_opcode()
 .end
 
 .sub new_oplib
@@ -24,6 +26,21 @@
     nok($I0, "new OpLib")
 .end
 
+.sub get_end
+    $P0 = new ['OpLib']
+    # Assumption: we'll always have an end opcode.
+    $I1 = $P0['end']
+    $I0 = isne $I1, -1
+    ok($I0, "got end opcode")
+.end
+
+.sub get_no_opcode
+    $P0 = new ['OpLib']
+    $I1 = $P0['hopeweneverhaveopcodesnamedlikethis']
+    $I0 = iseq $I1, -1
+    ok($I0, "get non existent opcode fails")
+.end
+
 # Local Variables:
 #   mode: pir
 #   fill-column: 100


More information about the parrot-commits mailing list