commit a74ca2b53cd48af3057017a6675683b01fc49a26
parent abf3c6c1a114819c32972c4bf501471018310714
Author: Samir Parikh <noreply@samirparikh.com>
Date: Thu, 25 Nov 2021 16:31:44 +0000
remove matrix-test.t file
Diffstat:
D | matrix/matrix-test.t | | | 80 | ------------------------------------------------------------------------------- |
1 file changed, 0 insertions(+), 80 deletions(-)
diff --git a/matrix/matrix-test.t b/matrix/matrix-test.t
@@ -1,80 +0,0 @@
-#!/usr/bin/env perl
-use Test2::V0;
-use JSON::PP;
-use constant JSON => JSON::PP->new;
-
-use FindBin qw<$Bin>;
-use lib $Bin, "$Bin/local/lib/perl5";
-
-use Matrix qw<row column>;
-
-my @test_cases = do { local $/; @{ JSON->decode(<DATA>) }; };
-
-imported_ok qw<row column> or bail_out;
-
-for my $case (@test_cases) {
- my $func;
- if ( $case->{property} eq 'row' ) {
- $func = \&row;
- }
- elsif ( $case->{property} eq 'column' ) {
- $func = \&column;
- }
-
- is( $func->( $case->{input} ),
- $case->{expected}, $case->{description}, );
-}
-
-done_testing;
-
-__DATA__
-[
- {
- "description": "extract row from one number matrix",
- "expected": [
- 1
- ],
- "input": {
- "index": 1,
- "string": "1"
- },
- "property": "row"
- },
- {
- "description": "can extract row",
- "expected": [
- 3,
- 4
- ],
- "input": {
- "index": 2,
- "string": "1 2\n3 4"
- },
- "property": "row"
- },
- {
- "description": "extract row where numbers have different widths",
- "expected": [
- 10,
- 20
- ],
- "input": {
- "index": 2,
- "string": "1 2\n10 20"
- },
- "property": "row"
- },
- {
- "description": "can extract row from non-square matrix with no corresponding column",
- "expected": [
- 8,
- 7,
- 6
- ],
- "input": {
- "index": 4,
- "string": "1 2 3\n4 5 6\n7 8 9\n8 7 6"
- },
- "property": "row"
- }
-]