diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-05-10 07:12:27 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-05-10 07:12:27 +0000 |
commit | 4a7bd3ac407a04094fea2c84cfffda534bff5868 (patch) | |
tree | 1f3735693ea29a75f78e18a91cb1281a18b02018 | |
parent | 50fc778f7a535b7346cc465df50cb53e1fecdccb (diff) | |
download | zetacomponents-graph-4a7bd3ac407a04094fea2c84cfffda534bff5868.zip zetacomponents-graph-4a7bd3ac407a04094fea2c84cfffda534bff5868.tar.gz |
- Added test for invalid multipication in reimplementaion of transformation
matrix multiplication
-rw-r--r-- | tests/transformation_test.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/transformation_test.php b/tests/transformation_test.php index 140e301..e3ed9a0 100644 --- a/tests/transformation_test.php +++ b/tests/transformation_test.php @@ -81,6 +81,26 @@ class ezcGraphTransformationTest extends ezcTestCase ); } + public function testTranslateMultiplicationInvalidDimension() + { + $a = new ezcGraphTranslation( 3, 2 ); + $b = new ezcGraphMatrix( 4, 3, array( + array( 1, 2, 3 ), + array( 4, 5, 6 ), + ) ); + + try + { + $a->multiply( $b ); + } + catch ( ezcGraphMatrixInvalidDimensionsException $e ) + { + return true; + } + + $this->fail( 'Expected ezcGraphMatrixInvalidDimensionsException.' ); + } + public function testTranslateCoordinate() { $transformation = new ezcGraphTranslation( 5, 5 ); |