1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-07-14 16:30:34 +03:00

Fix test references

This commit is contained in:
Alisa Mylnikova 2020-06-10 15:11:36 +07:00
parent 8319462d75
commit ae5627279e
19 changed files with 67 additions and 44 deletions

View File

@ -5,6 +5,22 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "57FCD26B1D76EA4600CC0FB6"
BuildableName = "Macaw.framework"
BlueprintName = "Macaw"
ReferencedContainer = "container:Macaw.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
@ -23,8 +39,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -36,8 +50,6 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
@ -45,6 +57,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "57FCD26B1D76EA4600CC0FB6"
BuildableName = "Macaw.framework"
BlueprintName = "Macaw"
ReferencedContainer = "container:Macaw.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">

View File

@ -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 {

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" ><g><g transform="translate(100,100)" ><text dominant-baseline="text-before-edge" fill="black" transform="matrix(0.707106781186548,-0.707106781186547,0.707106781186547,0.707106781186548,0,0)" >Point</text></g></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" ><g><g transform="translate(100,100)" ><text dominant-baseline="text-before-edge" fill="black" transform="matrix(0.707107,-0.707107,0.707107,0.707107,0,0)" >Point</text></g></g></svg>

Before

Width:  |  Height:  |  Size: 322 B

After

Width:  |  Height:  |  Size: 285 B

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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"

View File

@ -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"

View File

@ -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",

View File

@ -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",

View File

@ -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" : [

View File

@ -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",

View File

@ -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",

View File

@ -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"

View File

@ -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" : [

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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" : [