From 2c6fd2b0edbe44597b9e474246b05c29b0119900 Mon Sep 17 00:00:00 2001 From: Whiteknight Date: Wed, 18 Aug 2010 15:43:52 -0400 Subject: [PATCH] ComplexMatrix2D and NumericMatrix2D both 'does numericmatrix' to show their similarities. Also, the NumMatrix2D tests should inherit from NumericMatrixTest, which adds several more tests for arithmetic routine. Changing this exposes some broken tests, but it's more honest --- src/pmc/complexmatrix2d.pmc | 2 +- src/pmc/nummatrix2d.pmc | 2 +- t/pmc/nummatrix2d.t | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pmc/complexmatrix2d.pmc b/src/pmc/complexmatrix2d.pmc index 2157dab..e8dde9a 100644 --- a/src/pmc/complexmatrix2d.pmc +++ b/src/pmc/complexmatrix2d.pmc @@ -386,7 +386,7 @@ intkey_to_coords(PARROT_INTERP, const INTVAL rows, const INTVAL cols, } } -pmclass ComplexMatrix2D dynpmc auto_attrs provides matrix { +pmclass ComplexMatrix2D dynpmc auto_attrs provides matrix provides numericmatrix { ATTR FLOATVAL * storage; ATTR INTVAL rows; ATTR INTVAL cols; diff --git a/src/pmc/nummatrix2d.pmc b/src/pmc/nummatrix2d.pmc index 00f59fb..87f123f 100644 --- a/src/pmc/nummatrix2d.pmc +++ b/src/pmc/nummatrix2d.pmc @@ -238,7 +238,7 @@ floats_are_equal(FLOATVAL a, FLOATVAL b) } -pmclass NumMatrix2D dynpmc auto_attrs provides matrix { +pmclass NumMatrix2D dynpmc auto_attrs provides matrix provides numericmatrix { ATTR FLOATVAL * storage; ATTR INTVAL rows; ATTR INTVAL cols; diff --git a/t/pmc/nummatrix2d.t b/t/pmc/nummatrix2d.t index 853e253..234e19a 100644 --- a/t/pmc/nummatrix2d.t +++ b/t/pmc/nummatrix2d.t @@ -1,4 +1,4 @@ -class Test::NumMatrix2D is Pla::Matrix::MatrixTest; +class Test::NumMatrix2D is Pla::Matrix::NumericMatrixTest; # Test boilerplate.