diff --git a/Macaw.xcodeproj/xcshareddata/xcschemes/MacawTests.xcscheme b/Macaw.xcodeproj/xcshareddata/xcschemes/MacawTests.xcscheme
index 94cec15d..998fd245 100644
--- a/Macaw.xcodeproj/xcshareddata/xcschemes/MacawTests.xcscheme
+++ b/Macaw.xcodeproj/xcshareddata/xcschemes/MacawTests.xcscheme
@@ -5,6 +5,22 @@
+
+
+
+
+
+
-
-
-
-
+
+
+
+
diff --git a/MacawTests/MacawSVGTests.swift b/MacawTests/MacawSVGTests.swift
index fb22ef30..ba9a9b0f 100644
--- a/MacawTests/MacawSVGTests.swift
+++ b/MacawTests/MacawSVGTests.swift
@@ -43,7 +43,9 @@ class MacawSVGTests: XCTestCase {
if let path = bundle.path(forResource: referenceFile, ofType: "reference") {
let clipReferenceContent = try String.init(contentsOfFile: path).trimmingCharacters(in: .newlines)
let result = SVGSerializer.serialize(node: node)
- XCTAssertEqual(result, clipReferenceContent)
+ if result != clipReferenceContent {
+ XCTFail("result is not equal to referenceContent")
+ }
} else {
XCTFail("No file \(referenceFile)")
}
@@ -195,7 +197,7 @@ class MacawSVGTests: XCTestCase {
let referenceContent = try String(contentsOfFile: path)
let nodeContent = String(data: getJSONData(node: node), encoding: String.Encoding.utf8)
-
+
if nodeContent != referenceContent {
XCTFail("nodeContent is not equal to referenceContent")
}
@@ -314,7 +316,7 @@ class MacawSVGTests: XCTestCase {
}
func writeToFile(string: String, fileName: String) -> URL? {
- guard let directory = try? FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: false) as NSURL else {
+ guard let directory = try? FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true) as NSURL else {
return .none
}
do {
diff --git a/MacawTests/svg/textBasicTransform.reference b/MacawTests/svg/textBasicTransform.reference
index f8c09e0a..1faa17c8 100644
--- a/MacawTests/svg/textBasicTransform.reference
+++ b/MacawTests/svg/textBasicTransform.reference
@@ -1 +1 @@
-
+
\ No newline at end of file
diff --git a/MacawTests/w3cSVGTests/coords-trans-05-t-manual.reference b/MacawTests/w3cSVGTests/coords-trans-05-t-manual.reference
index b257fd9d..477448c5 100644
--- a/MacawTests/w3cSVGTests/coords-trans-05-t-manual.reference
+++ b/MacawTests/w3cSVGTests/coords-trans-05-t-manual.reference
@@ -40,7 +40,7 @@
}
],
"node" : "Group",
- "place" : "7.5, 0, 0, 5, 125.000002, 525"
+ "place" : "7.5, 0, 0, 5, 125.000003, 525"
}
],
"node" : "Group",
diff --git a/MacawTests/w3cSVGTests/coords-trans-07-t-manual.reference b/MacawTests/w3cSVGTests/coords-trans-07-t-manual.reference
index 76e5d517..5b7afca7 100644
--- a/MacawTests/w3cSVGTests/coords-trans-07-t-manual.reference
+++ b/MacawTests/w3cSVGTests/coords-trans-07-t-manual.reference
@@ -36,7 +36,7 @@
}
],
"node" : "Group",
- "place" : ".866025, .5, -.5, .866025, 123.205081, 186.60254"
+ "place" : "0.866025, 0.5, -0.5, 0.866025, 123.205081, 186.60254"
},
{
"align" : "min",
@@ -86,7 +86,7 @@
}
],
"node" : "Group",
- "place" : ".866025, .5, -.5, .866025, 200, 100"
+ "place" : "0.866025, 0.5, -0.5, 0.866025, 200, 100"
},
{
"align" : "min",
diff --git a/MacawTests/w3cSVGTests/coords-trans-09-t-manual.reference b/MacawTests/w3cSVGTests/coords-trans-09-t-manual.reference
index f452cef4..d094312d 100644
--- a/MacawTests/w3cSVGTests/coords-trans-09-t-manual.reference
+++ b/MacawTests/w3cSVGTests/coords-trans-09-t-manual.reference
@@ -186,7 +186,7 @@
}
],
"node" : "Group",
- "place" : "1, 0, .5, 1, 30, 170"
+ "place" : "1, 0, 0.5, 1, 30, 170"
},
{
"align" : "min",
@@ -236,7 +236,7 @@
}
],
"node" : "Group",
- "place" : "1, .5, 0, 1, 100, 200"
+ "place" : "1, 0.5, 0, 1, 100, 200"
},
{
"align" : "min",
@@ -336,7 +336,7 @@
}
],
"node" : "Group",
- "place" : "1, .8, .8, 1, 300, 220"
+ "place" : "1, 0.8, 0.8, 1, 300, 220"
},
{
"align" : "min",
diff --git a/MacawTests/w3cSVGTests/coords-trans-14-f-manual.reference b/MacawTests/w3cSVGTests/coords-trans-14-f-manual.reference
index db9708f8..916da24c 100644
--- a/MacawTests/w3cSVGTests/coords-trans-14-f-manual.reference
+++ b/MacawTests/w3cSVGTests/coords-trans-14-f-manual.reference
@@ -564,7 +564,7 @@
}
],
"node" : "Group",
- "place" : ".704769, -.256515, .256515, .704769, 0, 0"
+ "place" : "0.704769, -0.256515, 0.256515, 0.704769, 0, 0"
}
],
"node" : "Group"
diff --git a/MacawTests/w3cSVGTests/coords-transformattr-01-f-manual.reference b/MacawTests/w3cSVGTests/coords-transformattr-01-f-manual.reference
index 7cea70d3..4560daa7 100644
--- a/MacawTests/w3cSVGTests/coords-transformattr-01-f-manual.reference
+++ b/MacawTests/w3cSVGTests/coords-transformattr-01-f-manual.reference
@@ -20,7 +20,7 @@
}
],
"node" : "Group",
- "place" : ".565685, .565685, -.41411, .71726, 50, 50"
+ "place" : "0.565685, 0.565685, -0.41411, 0.71726, 50, 50"
},
{
"contents" : [
@@ -52,7 +52,7 @@
}
],
"node" : "Group",
- "place" : ".565685, .565685, -.41411, .71726, 50, 50"
+ "place" : "0.565685, 0.565685, -0.41411, 0.71726, 50, 50"
},
{
"contents" : [
@@ -72,7 +72,7 @@
}
],
"node" : "Group",
- "place" : ".565685, .565685, -.41411, .71726, 50, 50"
+ "place" : "0.565685, 0.565685, -0.41411, 0.71726, 50, 50"
},
{
"contents" : [
@@ -104,7 +104,7 @@
}
],
"node" : "Group",
- "place" : ".565685, .565685, -.41411, .71726, 50, 50"
+ "place" : "0.565685, 0.565685, -0.41411, 0.71726, 50, 50"
},
{
"contents" : [
@@ -124,7 +124,7 @@
}
],
"node" : "Group",
- "place" : ".565685, .565685, -.41411, .71726, 50, 50"
+ "place" : "0.565685, 0.565685, -0.41411, 0.71726, 50, 50"
},
{
"contents" : [
@@ -156,7 +156,7 @@
}
],
"node" : "Group",
- "place" : ".565685, .565685, -.41411, .71726, 50, 50"
+ "place" : "0.565685, 0.565685, -0.41411, 0.71726, 50, 50"
},
{
"contents" : [
@@ -176,7 +176,7 @@
}
],
"node" : "Group",
- "place" : ".565685, .565685, -.41411, .71726, 50, 50"
+ "place" : "0.565685, 0.565685, -0.41411, 0.71726, 50, 50"
},
{
"contents" : [
@@ -208,7 +208,7 @@
}
],
"node" : "Group",
- "place" : ".565685, .565685, -.41411, .71726, 50, 50"
+ "place" : "0.565685, 0.565685, -0.41411, 0.71726, 50, 50"
},
{
"contents" : [
@@ -228,7 +228,7 @@
}
],
"node" : "Group",
- "place" : ".565685, .565685, -.41411, .71726, 50, 50"
+ "place" : "0.565685, 0.565685, -0.41411, 0.71726, 50, 50"
},
{
"contents" : [
@@ -260,7 +260,7 @@
}
],
"node" : "Group",
- "place" : ".565685, .565685, -.41411, .71726, 50, 50"
+ "place" : "0.565685, 0.565685, -0.41411, 0.71726, 50, 50"
},
{
"contents" : [
@@ -280,7 +280,7 @@
}
],
"node" : "Group",
- "place" : ".565685, .565685, -.41411, .71726, 50, 50"
+ "place" : "0.565685, 0.565685, -0.41411, 0.71726, 50, 50"
},
{
"contents" : [
@@ -312,7 +312,7 @@
}
],
"node" : "Group",
- "place" : ".565685, .565685, -.41411, .71726, 50, 50"
+ "place" : "0.565685, 0.565685, -0.41411, 0.71726, 50, 50"
}
],
"node" : "Group"
diff --git a/MacawTests/w3cSVGTests/coords-transformattr-02-f-manual.reference b/MacawTests/w3cSVGTests/coords-transformattr-02-f-manual.reference
index 3081d23b..a94821e5 100644
--- a/MacawTests/w3cSVGTests/coords-transformattr-02-f-manual.reference
+++ b/MacawTests/w3cSVGTests/coords-transformattr-02-f-manual.reference
@@ -130,7 +130,7 @@
}
],
"node" : "Group",
- "place" : ".707107, .707107, -.707107, .707107, 0, 0"
+ "place" : "0.707107, 0.707107, -0.707107, 0.707107, 0, 0"
}
],
"node" : "Group",
@@ -209,7 +209,7 @@
}
],
"node" : "Group",
- "place" : ".707107, .707107, -.707107, .707107, 0, 0"
+ "place" : "0.707107, 0.707107, -0.707107, 0.707107, 0, 0"
}
],
"node" : "Group",
diff --git a/MacawTests/w3cSVGTests/coords-transformattr-05-f-manual.reference b/MacawTests/w3cSVGTests/coords-transformattr-05-f-manual.reference
index e11a73d1..ef8dfa66 100644
--- a/MacawTests/w3cSVGTests/coords-transformattr-05-f-manual.reference
+++ b/MacawTests/w3cSVGTests/coords-transformattr-05-f-manual.reference
@@ -106,7 +106,7 @@
}
],
"node" : "Group",
- "place" : ".965926, .258819, -.258819, .965926, 0, 0"
+ "place" : "0.965926, 0.258819, -0.258819, 0.965926, 0, 0"
},
{
"contents" : [
@@ -214,7 +214,7 @@
}
],
"node" : "Group",
- "place" : ".965926, .258819, -.258819, .965926, 0, 0"
+ "place" : "0.965926, 0.258819, -0.258819, 0.965926, 0, 0"
}
],
"node" : "Group",
diff --git a/MacawTests/w3cSVGTests/masking-path-02-b-manual.reference b/MacawTests/w3cSVGTests/masking-path-02-b-manual.reference
index 5e21d1e7..ad5b4a32 100644
--- a/MacawTests/w3cSVGTests/masking-path-02-b-manual.reference
+++ b/MacawTests/w3cSVGTests/masking-path-02-b-manual.reference
@@ -87,7 +87,7 @@
"y" : 0
},
"node" : "Shape",
- "place" : ".707107, -.707107, .707107, .707107, 100, 200"
+ "place" : "0.707107, -0.707107, 0.707107, 0.707107, 100, 200"
},
{
"form" : {
@@ -98,7 +98,7 @@
"y" : 60
},
"node" : "Shape",
- "place" : ".707107, -.707107, .707107, .707107, 100, 200",
+ "place" : "0.707107, -0.707107, 0.707107, 0.707107, 100, 200",
"stroke" : {
"cap" : "butt",
"dashes" : [
diff --git a/MacawTests/w3cSVGTests/metadata-example-01-t-manual.reference b/MacawTests/w3cSVGTests/metadata-example-01-t-manual.reference
index acf016fe..bc33eed6 100644
--- a/MacawTests/w3cSVGTests/metadata-example-01-t-manual.reference
+++ b/MacawTests/w3cSVGTests/metadata-example-01-t-manual.reference
@@ -6424,7 +6424,7 @@
}
],
"node" : "Group",
- "place" : ".04455, -.0227, .0227, .04455, 153, 58"
+ "place" : "0.04455, -0.0227, 0.0227, 0.04455, 153, 58"
}
],
"node" : "Group",
diff --git a/MacawTests/w3cSVGTests/pservers-grad-22-b-manual.reference b/MacawTests/w3cSVGTests/pservers-grad-22-b-manual.reference
index 045538db..0ad861b4 100644
--- a/MacawTests/w3cSVGTests/pservers-grad-22-b-manual.reference
+++ b/MacawTests/w3cSVGTests/pservers-grad-22-b-manual.reference
@@ -18,7 +18,7 @@
}
],
"node" : "Group",
- "place" : ".5, 0, 0, 1, 0, 0"
+ "place" : "0.5, 0, 0, 1, 0, 0"
}
],
"node" : "Group",
@@ -51,7 +51,7 @@
"y" : 0
},
"node" : "Shape",
- "place" : ".5, 0, 0, 1, 0, 0"
+ "place" : "0.5, 0, 0, 1, 0, 0"
}
],
"node" : "Group",
diff --git a/MacawTests/w3cSVGTests/shapes-ellipse-03-f-manual.reference b/MacawTests/w3cSVGTests/shapes-ellipse-03-f-manual.reference
index 593a0eb8..6933b717 100644
--- a/MacawTests/w3cSVGTests/shapes-ellipse-03-f-manual.reference
+++ b/MacawTests/w3cSVGTests/shapes-ellipse-03-f-manual.reference
@@ -170,7 +170,7 @@
}
],
"node" : "Group",
- "place" : ".866025, -.5, .5, .866025, 350, 150"
+ "place" : "0.866025, -0.5, 0.5, 0.866025, 350, 150"
}
],
"node" : "Group"
diff --git a/MacawTests/w3cSVGTests/shapes-line-02-f-manual.reference b/MacawTests/w3cSVGTests/shapes-line-02-f-manual.reference
index b31c8195..32ea892b 100644
--- a/MacawTests/w3cSVGTests/shapes-line-02-f-manual.reference
+++ b/MacawTests/w3cSVGTests/shapes-line-02-f-manual.reference
@@ -41,7 +41,7 @@
"y2" : 100
},
"node" : "Shape",
- "place" : ".965926, .258819, -.258819, .965926, 0, 0",
+ "place" : "0.965926, 0.258819, -0.258819, 0.965926, 0, 0",
"stroke" : {
"cap" : "butt",
"dashes" : [
diff --git a/MacawTests/w3cSVGTests/shapes-rect-05-f-manual.reference b/MacawTests/w3cSVGTests/shapes-rect-05-f-manual.reference
index 5384b245..5d780160 100644
--- a/MacawTests/w3cSVGTests/shapes-rect-05-f-manual.reference
+++ b/MacawTests/w3cSVGTests/shapes-rect-05-f-manual.reference
@@ -160,7 +160,7 @@
}
],
"node" : "Group",
- "place" : ".866025, -.5, .815207, .68404, 100, 100"
+ "place" : "0.866025, -0.5, 0.815207, 0.68404, 100, 100"
}
],
"node" : "Group"
diff --git a/MacawTests/w3cSVGTests/struct-frag-06-t-manual.reference b/MacawTests/w3cSVGTests/struct-frag-06-t-manual.reference
index 55fce126..4c8893fb 100644
--- a/MacawTests/w3cSVGTests/struct-frag-06-t-manual.reference
+++ b/MacawTests/w3cSVGTests/struct-frag-06-t-manual.reference
@@ -192,7 +192,7 @@
}
],
"node" : "Group",
- "place" : ".2, 0, 0, .2, 90, 235"
+ "place" : "0.2, 0, 0, 0.2, 90, 235"
},
{
"align" : "mid",
@@ -296,7 +296,7 @@
}
],
"node" : "Group",
- "place" : ".2, 0, 0, .2, 190, 235"
+ "place" : "0.2, 0, 0, 0.2, 190, 235"
}
],
"node" : "Group"
diff --git a/MacawTests/w3cSVGTests/struct-group-01-t-manual.reference b/MacawTests/w3cSVGTests/struct-group-01-t-manual.reference
index 4814ac3e..461c2681 100644
--- a/MacawTests/w3cSVGTests/struct-group-01-t-manual.reference
+++ b/MacawTests/w3cSVGTests/struct-group-01-t-manual.reference
@@ -102,7 +102,7 @@
}
],
"node" : "Group",
- "place" : ".939693, -.34202, .34202, .939693, 0, 0"
+ "place" : "0.939693, -0.34202, 0.34202, 0.939693, 0, 0"
}
],
"node" : "Group"
diff --git a/MacawTests/w3cSVGTests/struct-use-03-t-manual.reference b/MacawTests/w3cSVGTests/struct-use-03-t-manual.reference
index edb66756..b7df32a3 100644
--- a/MacawTests/w3cSVGTests/struct-use-03-t-manual.reference
+++ b/MacawTests/w3cSVGTests/struct-use-03-t-manual.reference
@@ -64,7 +64,7 @@
}
],
"node" : "Group",
- "place" : ".707107, .707107, -.707107, .707107, 120, 99.289322"
+ "place" : "0.707107, 0.707107, -0.707107, 0.707107, 120, 99.289322"
},
{
"contents" : [
@@ -81,7 +81,7 @@
"y" : 0
},
"node" : "Shape",
- "place" : ".707107, .707107, -.707107, .707107, 120, 99.289322",
+ "place" : "0.707107, 0.707107, -0.707107, 0.707107, 120, 99.289322",
"stroke" : {
"cap" : "butt",
"dashes" : [