summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-05-10 07:12:27 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-05-10 07:12:27 +0000
commit4a7bd3ac407a04094fea2c84cfffda534bff5868 (patch)
tree1f3735693ea29a75f78e18a91cb1281a18b02018 /tests
parent50fc778f7a535b7346cc465df50cb53e1fecdccb (diff)
downloadzetacomponents-graph-4a7bd3ac407a04094fea2c84cfffda534bff5868.zip
zetacomponents-graph-4a7bd3ac407a04094fea2c84cfffda534bff5868.tar.gz
- Added test for invalid multipication in reimplementaion of transformation
matrix multiplication
Diffstat (limited to 'tests')
-rw-r--r--tests/transformation_test.php20
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 );
OpenPOWER on IntegriCloud