Skip to content

Commit

Permalink
add a stub test for verifying subclass behavior. Test fails because o…
Browse files Browse the repository at this point in the history
…f weirdness elsewhere in the dependency tree.
  • Loading branch information
Whiteknight committed Sep 8, 2010
1 parent cfcbcb1 commit 9286277
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions t/pir-subclass/nummatrix2d.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.sub test_main
.include 'test_more.pir'
say "1..1"

test_get_pmc_keyed()
.end

#.HLL 'NumMatrix2D_HLL_Test'

.sub '' :anon :init :load
$P0 = get_class ['Float']
$P1 = subclass $P0, ['TestFloat']
$P2 = getinterp
$P2.'hll_map'($P0, $P1)
.include 'test_more.pir'
.end

.sub is_TestFloat
.param pmc arg
$S0 = typeof arg
'is'($S0, 'TestFloat')
.end

.sub test_get_pmc_keyed
$P0 = new ['NumMatrix2D']
$P0.'initialize_from_args'(2, 2, 1, 2, 3, 4)
$P1 = $P0[0;0]
is_TestFloat($P1)
.end

# .HLL 'parrot'

0 comments on commit 9286277

Please sign in to comment.