add missing parseTransformString tests

master
adeveria 2013-09-23 10:58:36 -07:00
parent e1665067ae
commit c6138bf585
1 changed files with 8 additions and 15 deletions

View File

@ -288,23 +288,16 @@ describe("Savage methods", function () {
var pathArrs = Savage.parsePathString(["M1 2"]); var pathArrs = Savage.parsePathString(["M1 2"]);
expect(pathArrs[0]).to.eql(["M", 1, 2]); expect(pathArrs[0]).to.eql(["M", 1, 2]);
}); });
/*
// TODO: Find out how parseTransformString should work
it("Savage.parseTransformString - string", function() { it("Savage.parseTransformString - string", function() {
var transformArrs = Savage.parseTransformString( var matrix = new Savage.Matrix(1, 0, 0, 2, 0, 0);
"matrix(1, 2, 3, 4, 5, 6) " + var str = matrix.toTransformString();
"translate(7) " + var output = Savage.parseTransformString(str);
"translate(8 9) " + expect(output[0]).to.eql(['s', 1, 2, 0, 0]);
"scale(10) " + });
"scale(11, 12) " + it("Savage.parseTransformString - array", function() {
"rotate(13) " + var output = Savage.parseTransformString(['s', 1, 2, 0, 0]);
"rotate(14 15 16) " + expect(output[0]).to.eql(['s', 1, 2, 0, 0]);
"skewX(17) " +
"skewY(18) "
);
expect(transformArrs[0]).to.eql(["matrix", 1, 2, 3, 4, 5, 6]);
}); });
*/
it("Savage.select", function() { it("Savage.select", function() {
var s = Savage(10, 10); var s = Savage(10, 10);
var group1 = s.group(); var group1 = s.group();