Skip to content

Commit

Permalink
some more oplib testing
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/trunk@44466 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
NotFound authored and NotFound committed Feb 24, 2010
1 parent e955922 commit 960cf56
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion t/pmc/oplib.t
Expand Up @@ -14,8 +14,10 @@ t/pmc/oplib.t - OpLib PMC

.sub main :main
.include 'test_more.pir'
plan(1)
plan(3)
new_oplib()
get_end()
get_no_opcode()
.end

.sub new_oplib
Expand All @@ -24,6 +26,21 @@ t/pmc/oplib.t - OpLib PMC
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
Expand Down

0 comments on commit 960cf56

Please sign in to comment.