Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Major refactor to the test suite. Break up the single matrixtest.nqp …
…file into several smaller files for manageability. During the build we compile these files and merge them together into t/testlib/pla_test.pbc, which can be loaded for a modest startup time improvement. Break out a subclass NumericMatrixTest which I can use to test the Num and Complex matrices for common math operations
- Loading branch information
1 parent
f1eae20
commit 0fc9e91
Showing
12 changed files
with
262 additions
and
177 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 |
---|---|---|
|
@@ -8,3 +8,4 @@ Makefile | |
*_group.* | ||
src/pmc/pmc_*.h | ||
src/nqp/*.pir | ||
t/testlib/*.pir |
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
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
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
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
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
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
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
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,34 @@ | ||
|
||
class Pla::Matrix::Loader is UnitTest::Loader { | ||
|
||
method order_tests(@tests) { | ||
my $test_method := 'test_ME'; | ||
my $test_op := 'test_OP'; | ||
my $test_vtable := 'test_VT'; | ||
|
||
my $len := $test_op.length; # The shortest | ||
|
||
my %partition; | ||
for <test_me test_op test_vt MISC> { | ||
%partition{$_} := [ ]; | ||
} | ||
|
||
for @tests -> $name { | ||
my $name_lc := pir::downcase__SS($name).substr(0, $len); | ||
|
||
if %partition.contains( $name_lc ) { | ||
%partition{$name_lc}.push: $name; | ||
} | ||
else { | ||
%partition<MISC>.push: $name; | ||
} | ||
} | ||
|
||
my @result; | ||
for <test_op test_vt MISC test_me> { | ||
@result.append: %partition{$_}.unsort; | ||
} | ||
|
||
@result; | ||
} | ||
} |
Oops, something went wrong.