From a09c5094a4e42b75ca44e58abea7d7fa45659628 Mon Sep 17 00:00:00 2001 From: Bob Lied Date: Sat, 11 Nov 2023 10:43:53 -0600 Subject: Add string tests --- challenge-242/bob-lied/perl/ch-2.pl | 10 +++++++--- 1 file 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; } -- cgit