| This test exercises the SVGMatrix interface |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| SVGMatrix constructors |
| PASS default constructor |
| |
| Test attributes on default matrix |
| PASS m.a is 1 |
| PASS m.b is 0 |
| PASS m.c is 0 |
| PASS m.d is 1 |
| PASS m.e is 0 |
| PASS m.f is 0 |
| |
| Test attributes on translate() and accumulation |
| PASS m2.a is 1 |
| PASS m2.b is 0 |
| PASS m2.c is 0 |
| PASS m2.d is 1 |
| PASS m2.e is 100 |
| PASS m2.f is 50 |
| |
| Test immutability of translate() |
| PASS parseFloat(m.a) is 1 |
| PASS parseFloat(m.b) is 0 |
| PASS parseFloat(m.c) is 0 |
| PASS parseFloat(m.d) is 1 |
| PASS parseFloat(m.e) is 0 |
| PASS parseFloat(m.f) is 0 |
| |
| Test attributes on scale() |
| PASS m3.a is 5 |
| PASS m3.b is 0 |
| PASS m3.c is 0 |
| PASS m3.d is 5 |
| PASS m3.e is 100 |
| PASS m3.f is 50 |
| |
| Test immutability of scale() |
| PASS parseFloat(m2.a) is 1 |
| PASS parseFloat(m2.b) is 0 |
| PASS parseFloat(m2.c) is 0 |
| PASS parseFloat(m2.d) is 1 |
| PASS parseFloat(m2.e) is 100 |
| PASS parseFloat(m2.f) is 50 |
| |
| Test attributes on scaleNonUniform() |
| PASS m4.a is 10 |
| PASS m4.b is 0 |
| PASS m4.c is 0 |
| PASS m4.d is 5 |
| PASS m4.e is 100 |
| PASS m4.f is 50 |
| |
| Test immutability of scaleNonUniform() |
| PASS parseFloat(m3.a) is 5 |
| PASS parseFloat(m3.b) is 0 |
| PASS parseFloat(m3.c) is 0 |
| PASS parseFloat(m3.d) is 5 |
| PASS parseFloat(m3.e) is 100 |
| PASS parseFloat(m3.f) is 50 |
| |
| Test rotate() |
| PASS parseFloat(m2.a.toPrecision(6)) is 0.984808 |
| PASS parseFloat(m2.b.toPrecision(6)) is 0.173648 |
| PASS parseFloat(m2.c.toPrecision(6)) is -0.173648 |
| PASS parseFloat(m2.d.toPrecision(6)) is 0.984808 |
| PASS m.e is 0 |
| PASS m.f is 0 |
| |
| Test immutability of rotate() |
| PASS parseFloat(m.a) is 1 |
| PASS parseFloat(m.b) is 0 |
| PASS parseFloat(m.c) is 0 |
| PASS parseFloat(m.d) is 1 |
| PASS parseFloat(m.e) is 0 |
| PASS parseFloat(m.f) is 0 |
| |
| Test flipX() |
| PASS m4.a is -5 |
| PASS Math.abs(m4.b) is 0 |
| PASS m4.c is 0 |
| PASS m4.d is 5 |
| PASS m4.e is 100 |
| PASS m4.f is 50 |
| |
| Test immutability of flipX() |
| PASS parseFloat(m3.a) is 5 |
| PASS parseFloat(m3.b) is 0 |
| PASS parseFloat(m3.c) is 0 |
| PASS parseFloat(m3.d) is 5 |
| PASS parseFloat(m3.e) is 100 |
| PASS parseFloat(m3.f) is 50 |
| |
| Test flipY() |
| PASS m4.a is 5 |
| PASS m4.b is 0 |
| PASS Math.abs(m4.c) is 0 |
| PASS m4.d is -5 |
| PASS m4.e is 100 |
| PASS m4.f is 50 |
| |
| Test immutability of flipY() |
| PASS parseFloat(m3.a) is 5 |
| PASS parseFloat(m3.b) is 0 |
| PASS parseFloat(m3.c) is 0 |
| PASS parseFloat(m3.d) is 5 |
| PASS parseFloat(m3.e) is 100 |
| PASS parseFloat(m3.f) is 50 |
| |
| Test skewX() |
| PASS m2.a is 1 |
| PASS m2.b is 0 |
| PASS parseFloat(m2.c.toPrecision(6)) is 0.577350 |
| PASS m2.d is 1 |
| PASS m2.e is 0 |
| PASS m2.f is 0 |
| |
| Test immutability of skewX() |
| PASS parseFloat(m.a) is 1 |
| PASS parseFloat(m.b) is 0 |
| PASS parseFloat(m.c) is 0 |
| PASS parseFloat(m.d) is 1 |
| PASS parseFloat(m.e) is 0 |
| PASS parseFloat(m.f) is 0 |
| |
| Test skewY() |
| PASS m2.a is 1 |
| PASS parseFloat(m2.b.toPrecision(6)) is 0.577350 |
| PASS m2.c is 0 |
| PASS m2.d is 1 |
| PASS m2.e is 0 |
| PASS m2.f is 0 |
| |
| Test immutability of skewY() |
| PASS parseFloat(m.a) is 1 |
| PASS parseFloat(m.b) is 0 |
| PASS parseFloat(m.c) is 0 |
| PASS parseFloat(m.d) is 1 |
| PASS parseFloat(m.e) is 0 |
| PASS parseFloat(m.f) is 0 |
| |
| Test multiply |
| PASS parseFloat(m3.a) is 31 |
| PASS parseFloat(m3.b) is 46 |
| PASS parseFloat(m3.c) is 39 |
| PASS parseFloat(m3.d) is 58 |
| PASS parseFloat(m3.e) is 52 |
| PASS parseFloat(m3.f) is 76 |
| |
| Test that multiply works in the right direction |
| PASS m.a is 2 |
| PASS m.b is 0 |
| PASS m.c is 0 |
| PASS m.d is 1 |
| PASS m.e is 100 |
| PASS m.f is 0 |
| |
| Test immutability of multiply |
| PASS tx.a is 1 |
| PASS tx.b is 0 |
| PASS tx.c is 0 |
| PASS tx.d is 1 |
| PASS tx.e is 100 |
| PASS tx.f is 0 |
| PASS sx.a is 2 |
| PASS sx.b is 0 |
| PASS sx.c is 0 |
| PASS sx.d is 1 |
| PASS sx.e is 0 |
| PASS sx.f is 0 |
| |
| Test multiply with missing argument |
| PASS m is null |
| |
| Test inverse |
| PASS parseFloat(m2.a) is 0.5 |
| PASS parseFloat(m2.b) is 0 |
| PASS parseFloat(m2.c) is 0 |
| PASS parseFloat(m2.d) is 0.5 |
| PASS parseFloat(m2.e) is -5 |
| PASS parseFloat(m2.f) is -10 |
| |
| Test immutability of inverse |
| PASS parseFloat(m.a) is 2 |
| PASS parseFloat(m.b) is 0 |
| PASS parseFloat(m.c) is 0 |
| PASS parseFloat(m.d) is 2 |
| PASS parseFloat(m.e) is 10 |
| PASS parseFloat(m.f) is 20 |
| |
| Test throwing exception from inverse |
| PASS m.inverse() threw exception InvalidStateError: Matrix is not invertible. |
| |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |