diff options
| author | Bob Lied <boblied+github@gmail.com> | 2023-11-11 10:43:53 -0600 |
|---|---|---|
| committer | Bob Lied <boblied+github@gmail.com> | 2023-11-11 10:43:53 -0600 |
| commit | a09c5094a4e42b75ca44e58abea7d7fa45659628 (patch) | |
| tree | 42428110b20b0e2e06e23ff3fd0f48b5ac8b8057 /challenge-242 | |
| parent | eda5dc49c9e6bb091094d8ee8e1a0d15a31eff64 (diff) | |
| download | perlweeklychallenge-club-a09c5094a4e42b75ca44e58abea7d7fa45659628.tar.gz perlweeklychallenge-club-a09c5094a4e42b75ca44e58abea7d7fa45659628.tar.bz2 perlweeklychallenge-club-a09c5094a4e42b75ca44e58abea7d7fa45659628.zip | |
Add string tests
Diffstat (limited to 'challenge-242')
| -rw-r--r-- | challenge-242/bob-lied/perl/ch-2.pl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/challenge-242/bob-lied/perl/ch-2.pl b/challenge-242/bob-lied/perl/ch-2.pl index 89b7e519d9..362a7bf55a 100644 --- a/challenge-242/bob-lied/perl/ch-2.pl +++ b/challenge-242/bob-lied/perl/ch-2.pl @@ -83,15 +83,19 @@ sub runTest is( flipMatrix_B([[1, 1, 0, 0], [1, 0, 0, 1], [0, 1, 1, 1], [1, 0, 1, 0]]), [[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 0, 1], [1, 0, 1, 0]], "B Example 2"); + is( flipMatrix_B( [[]]), [[]], "B 0x0"); + is( flipMatrix_B( [[1]]), [[0]], "B 1x1"); + is( flipMatrix_B( [[1,0],[1,0]]), [[1,0],[1,0]], "B 2x2"); + is( flipMatrix_S([[1, 1, 0], [1, 0, 1], [0, 0, 0]]), [[1, 0, 0], [0, 1, 0], [1, 1, 1]], "S Example 1"); is( flipMatrix_S([[1, 1, 0, 0], [1, 0, 0, 1], [0, 1, 1, 1], [1, 0, 1, 0]]), [[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 0, 1], [1, 0, 1, 0]], "S Example 2"); - is( flipMatrix_B( [[]]), [[]], "0x0"); - is( flipMatrix_B( [[1]]), [[0]], "1x1"); - is( flipMatrix_B( [[1,0],[1,0]]), [[1,0],[1,0]], "2x2"); + is( flipMatrix_S( [[]]), [[]], "S 0x0"); + is( flipMatrix_S( [[1]]), [[0]], "S 1x1"); + is( flipMatrix_S( [[1,0],[1,0]]), [[1,0],[1,0]], "S 2x2"); done_testing; } |
