-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a stub test for verifying subclass behavior. Test fails because o…
…f weirdness elsewhere in the dependency tree.
- Loading branch information
1 parent
cfcbcb1
commit 9286277
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |