mirror of
https://github.com/exyte/Macaw.git
synced 2024-10-26 13:01:25 +03:00
Merge pull request #584 from exyte/fix/583
Fix #583 setup MacawTest to run on OSX
This commit is contained in:
commit
91483c0143
@ -1,4 +1,4 @@
|
||||
language: objective-c
|
||||
language: swift
|
||||
osx_image: xcode10.2
|
||||
|
||||
branches:
|
||||
@ -7,7 +7,8 @@ branches:
|
||||
|
||||
script:
|
||||
- set -o pipefail && xcodebuild test -project Macaw.xcodeproj -scheme 'Macaw iOS' -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO -destination 'platform=iOS Simulator,OS=12.2,name=iPhone X' | xcpretty;
|
||||
- set -o pipefail && xcodebuild build -project Macaw.xcodeproj -scheme 'MacawOSX' ONLY_ACTIVE_ARCH=NO | xcpretty;
|
||||
- set -o pipefail && xcodebuild test -project Macaw.xcodeproj -scheme 'MacawOSX' ONLY_ACTIVE_ARCH=NO | xcpretty;
|
||||
|
||||
|
||||
notifications:
|
||||
slack: exyte:kdo9FNtTOFMuMqAyyvZPDAD7
|
||||
|
@ -21,6 +21,7 @@
|
||||
30FF4971215CF4CE00FF653C /* MCAMediaTimingFunctionName_macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30FF4970215CF4CE00FF653C /* MCAMediaTimingFunctionName_macOS.swift */; };
|
||||
421C66502225196900DD73F5 /* color-prop-04-t-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = 421C664F2225196900DD73F5 /* color-prop-04-t-manual.svg */; };
|
||||
4269F43E2257265800D91393 /* color-prop-04-t-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = 4269F43D2257265700D91393 /* color-prop-04-t-manual.reference */; };
|
||||
42D86F3C229E86300035DE11 /* README in Resources */ = {isa = PBXBuildFile; fileRef = 42D86F3B229E86300035DE11 /* README */; };
|
||||
5713C4E21E51EC8F00BBA4D9 /* TouchEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5713C4E11E51EC8F00BBA4D9 /* TouchEvent.swift */; };
|
||||
5713C4F31E5AD46800BBA4D9 /* ControlStatesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5713C4F21E5AD46800BBA4D9 /* ControlStatesTests.swift */; };
|
||||
5713C4F51E5AE2C300BBA4D9 /* CombineAnimationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5713C4F41E5AE2C300BBA4D9 /* CombineAnimationTests.swift */; };
|
||||
@ -223,7 +224,6 @@
|
||||
57F108741F502A3600DC365B /* Touchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F108731F502A3600DC365B /* Touchable.swift */; };
|
||||
57F1087A1F53C92000DC365B /* MDisplayLink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F108791F53C92000DC365B /* MDisplayLink.swift */; };
|
||||
57F1087C1F53CA7E00DC365B /* MDisplayLink_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F1087B1F53CA7E00DC365B /* MDisplayLink_iOS.swift */; };
|
||||
57FCD2771D76EA4600CC0FB6 /* Macaw.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57FCD26C1D76EA4600CC0FB6 /* Macaw.framework */; };
|
||||
57FCD27C1D76EA4600CC0FB6 /* MacawTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57FCD27B1D76EA4600CC0FB6 /* MacawTests.swift */; };
|
||||
5815D59D2186E89A00BD08F9 /* CSSParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5815D59C2186E89A00BD08F9 /* CSSParser.swift */; };
|
||||
5815D59E2186E89A00BD08F9 /* CSSParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5815D59C2186E89A00BD08F9 /* CSSParser.swift */; };
|
||||
@ -512,6 +512,8 @@
|
||||
A74C81ED229284790085A832 /* struct-use-01-t-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C81EB229284780085A832 /* struct-use-01-t-manual.svg */; };
|
||||
A74C81F12292B3940085A832 /* color-prop-05-t-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C81F02292B3940085A832 /* color-prop-05-t-manual.svg */; };
|
||||
A74C81F32292B45E0085A832 /* color-prop-05-t-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C81F22292B45D0085A832 /* color-prop-05-t-manual.reference */; };
|
||||
A74C82032296BE5F0085A832 /* paths-data-20-f-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C82022296BE5F0085A832 /* paths-data-20-f-manual.svg */; };
|
||||
A74C82052296BFC60085A832 /* paths-data-20-f-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C82042296BFC60085A832 /* paths-data-20-f-manual.reference */; };
|
||||
A74C821F2297D4810085A832 /* coords-trans-13-f-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C821A2297D4800085A832 /* coords-trans-13-f-manual.svg */; };
|
||||
A74C82202297D4810085A832 /* coords-trans-14-f-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C821B2297D4800085A832 /* coords-trans-14-f-manual.svg */; };
|
||||
A74C82212297D4810085A832 /* coords-trans-11-f-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C821C2297D4800085A832 /* coords-trans-11-f-manual.svg */; };
|
||||
@ -530,8 +532,8 @@
|
||||
A74C823E2297DB2C0085A832 /* shapes-rect-03-t-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C823A2297DB2B0085A832 /* shapes-rect-03-t-manual.reference */; };
|
||||
A74C823F2297DB2C0085A832 /* shapes-rect-06-f-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C823B2297DB2B0085A832 /* shapes-rect-06-f-manual.reference */; };
|
||||
A74C82412297DC220085A832 /* shapes-rect-02-t-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C82402297DC220085A832 /* shapes-rect-02-t-manual.reference */; };
|
||||
A74C82032296BE5F0085A832 /* paths-data-20-f-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C82022296BE5F0085A832 /* paths-data-20-f-manual.svg */; };
|
||||
A74C82052296BFC60085A832 /* paths-data-20-f-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C82042296BFC60085A832 /* paths-data-20-f-manual.reference */; };
|
||||
A74C832C229FB7690085A832 /* color-prop-04-t-manual-osx.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C832B229FB7690085A832 /* color-prop-04-t-manual-osx.svg */; };
|
||||
A74C832E229FBA4C0085A832 /* color-prop-04-t-manual-osx.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C832D229FBA4C0085A832 /* color-prop-04-t-manual-osx.reference */; };
|
||||
A7E675561EC4213500BD9ECB /* NodeBoundsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E675551EC4213500BD9ECB /* NodeBoundsTests.swift */; };
|
||||
C410148E1F834D290022EE44 /* style.svg in Resources */ = {isa = PBXBuildFile; fileRef = C410148D1F834D280022EE44 /* style.svg */; };
|
||||
C4153A8F1F8793DE001BA5EE /* small-logo.png in Resources */ = {isa = PBXBuildFile; fileRef = C4153A8E1F8793DD001BA5EE /* small-logo.png */; };
|
||||
@ -585,6 +587,7 @@
|
||||
30FF4970215CF4CE00FF653C /* MCAMediaTimingFunctionName_macOS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MCAMediaTimingFunctionName_macOS.swift; sourceTree = "<group>"; };
|
||||
421C664F2225196900DD73F5 /* color-prop-04-t-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "color-prop-04-t-manual.svg"; sourceTree = "<group>"; };
|
||||
4269F43D2257265700D91393 /* color-prop-04-t-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "color-prop-04-t-manual.reference"; sourceTree = "<group>"; };
|
||||
42D86F3B229E86300035DE11 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
|
||||
5713C4E11E51EC8F00BBA4D9 /* TouchEvent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TouchEvent.swift; sourceTree = "<group>"; };
|
||||
5713C4F21E5AD46800BBA4D9 /* ControlStatesTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlStatesTests.swift; sourceTree = "<group>"; };
|
||||
5713C4F41E5AE2C300BBA4D9 /* CombineAnimationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CombineAnimationTests.swift; sourceTree = "<group>"; };
|
||||
@ -951,6 +954,8 @@
|
||||
A74C81EB229284780085A832 /* struct-use-01-t-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "struct-use-01-t-manual.svg"; sourceTree = "<group>"; };
|
||||
A74C81F02292B3940085A832 /* color-prop-05-t-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "color-prop-05-t-manual.svg"; sourceTree = "<group>"; };
|
||||
A74C81F22292B45D0085A832 /* color-prop-05-t-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "color-prop-05-t-manual.reference"; sourceTree = "<group>"; };
|
||||
A74C82022296BE5F0085A832 /* paths-data-20-f-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "paths-data-20-f-manual.svg"; sourceTree = "<group>"; };
|
||||
A74C82042296BFC60085A832 /* paths-data-20-f-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "paths-data-20-f-manual.reference"; sourceTree = "<group>"; };
|
||||
A74C821A2297D4800085A832 /* coords-trans-13-f-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "coords-trans-13-f-manual.svg"; sourceTree = "<group>"; };
|
||||
A74C821B2297D4800085A832 /* coords-trans-14-f-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "coords-trans-14-f-manual.svg"; sourceTree = "<group>"; };
|
||||
A74C821C2297D4800085A832 /* coords-trans-11-f-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "coords-trans-11-f-manual.svg"; sourceTree = "<group>"; };
|
||||
@ -969,8 +974,8 @@
|
||||
A74C823A2297DB2B0085A832 /* shapes-rect-03-t-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "shapes-rect-03-t-manual.reference"; sourceTree = "<group>"; };
|
||||
A74C823B2297DB2B0085A832 /* shapes-rect-06-f-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "shapes-rect-06-f-manual.reference"; sourceTree = "<group>"; };
|
||||
A74C82402297DC220085A832 /* shapes-rect-02-t-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "shapes-rect-02-t-manual.reference"; sourceTree = "<group>"; };
|
||||
A74C82022296BE5F0085A832 /* paths-data-20-f-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "paths-data-20-f-manual.svg"; sourceTree = "<group>"; };
|
||||
A74C82042296BFC60085A832 /* paths-data-20-f-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "paths-data-20-f-manual.reference"; sourceTree = "<group>"; };
|
||||
A74C832B229FB7690085A832 /* color-prop-04-t-manual-osx.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "color-prop-04-t-manual-osx.svg"; sourceTree = "<group>"; };
|
||||
A74C832D229FBA4C0085A832 /* color-prop-04-t-manual-osx.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "color-prop-04-t-manual-osx.reference"; sourceTree = "<group>"; };
|
||||
A7E675551EC4213500BD9ECB /* NodeBoundsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NodeBoundsTests.swift; path = Bounds/NodeBoundsTests.swift; sourceTree = "<group>"; };
|
||||
C410148D1F834D280022EE44 /* style.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = style.svg; sourceTree = "<group>"; };
|
||||
C4153A8E1F8793DD001BA5EE /* small-logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "small-logo.png"; sourceTree = "<group>"; };
|
||||
@ -999,7 +1004,6 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
57FCD2771D76EA4600CC0FB6 /* Macaw.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -1391,12 +1395,13 @@
|
||||
5713C4F11E5AD35900BBA4D9 /* Animation */,
|
||||
57CAB1241D7832E000FD8E47 /* svg */,
|
||||
5B1AE18320B6A669007EECCB /* w3cSVGTests */,
|
||||
57CAB1221D782DFC00FD8E47 /* TestUtils.swift */,
|
||||
57FCD27B1D76EA4600CC0FB6 /* MacawTests.swift */,
|
||||
C4820B191F458D64008CE0FF /* MacawSVGTests.swift */,
|
||||
5BAE2057208F24DE006BF277 /* SceneSerialization.swift */,
|
||||
57FCD27D1D76EA4600CC0FB6 /* Info.plist */,
|
||||
6A616BFB212964E8006A07FA /* SVGParserTest.swift */,
|
||||
5BAE2057208F24DE006BF277 /* SceneSerialization.swift */,
|
||||
57CAB1221D782DFC00FD8E47 /* TestUtils.swift */,
|
||||
42D86F3B229E86300035DE11 /* README */,
|
||||
57FCD27D1D76EA4600CC0FB6 /* Info.plist */,
|
||||
);
|
||||
path = MacawTests;
|
||||
sourceTree = "<group>";
|
||||
@ -1420,6 +1425,8 @@
|
||||
5B1AE20320B6A669007EECCB /* color-prop-03-t-manual.svg */,
|
||||
4269F43D2257265700D91393 /* color-prop-04-t-manual.reference */,
|
||||
421C664F2225196900DD73F5 /* color-prop-04-t-manual.svg */,
|
||||
A74C832D229FBA4C0085A832 /* color-prop-04-t-manual-osx.reference */,
|
||||
A74C832B229FB7690085A832 /* color-prop-04-t-manual-osx.svg */,
|
||||
A74C81F22292B45D0085A832 /* color-prop-05-t-manual.reference */,
|
||||
A74C81F02292B3940085A832 /* color-prop-05-t-manual.svg */,
|
||||
5B1AE1D420B6A669007EECCB /* coords-coord-01-t-manual.reference */,
|
||||
@ -1977,6 +1984,7 @@
|
||||
5B1AE29920B6A669007EECCB /* pservers-grad-stops-01-f-manual.svg in Resources */,
|
||||
5B1AE27520B6A669007EECCB /* struct-frag-04-t-manual.reference in Resources */,
|
||||
A74C82292297D5350085A832 /* coords-trans-12-f-manual.reference in Resources */,
|
||||
A74C832E229FBA4C0085A832 /* color-prop-04-t-manual-osx.reference in Resources */,
|
||||
5B1AE28720B6A669007EECCB /* render-elems-03-t-manual.svg in Resources */,
|
||||
5B1AE2AD20B6A669007EECCB /* painting-stroke-05-t-manual.reference in Resources */,
|
||||
5B1AE25920B6A669007EECCB /* coords-trans-01-b-manual.svg in Resources */,
|
||||
@ -2032,6 +2040,7 @@
|
||||
57CAB1311D7832E000FD8E47 /* line.svg in Resources */,
|
||||
A74C82222297D4810085A832 /* coords-trans-10-f-manual.svg in Resources */,
|
||||
57B7A4DF1EE70D17009D78D7 /* logo.png in Resources */,
|
||||
A74C832C229FB7690085A832 /* color-prop-04-t-manual-osx.svg in Resources */,
|
||||
5B1AE24F20B6A669007EECCB /* painting-stroke-02-t-manual.reference in Resources */,
|
||||
5B1AE28420B6A669007EECCB /* shapes-polyline-01-t-manual.reference in Resources */,
|
||||
5B1AE2C320B6A669007EECCB /* text-fonts-02-t-manual.reference in Resources */,
|
||||
@ -2069,6 +2078,7 @@
|
||||
5B1AE2A920B6A669007EECCB /* struct-frag-04-t-manual.svg in Resources */,
|
||||
5B1AE25F20B6A669007EECCB /* coords-transformattr-05-f-manual.svg in Resources */,
|
||||
57CAB1341D7832E000FD8E47 /* rect.svg in Resources */,
|
||||
42D86F3C229E86300035DE11 /* README in Resources */,
|
||||
5B1AE2D920B6A669007EECCB /* render-elems-03-t-manual.reference in Resources */,
|
||||
5B1AE28120B6A669007EECCB /* coords-transformattr-04-f-manual.svg in Resources */,
|
||||
5B1AE2B020B6A669007EECCB /* paths-data-16-t-manual.svg in Resources */,
|
||||
|
@ -28,7 +28,26 @@
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "57FCD2751D76EA4600CC0FB6"
|
||||
BuildableName = "MacawTests.xctest"
|
||||
BlueprintName = "MacawTests"
|
||||
ReferencedContainer = "container:Macaw.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "57614AFB1F83D15600875933"
|
||||
BuildableName = "MacawOSX.framework"
|
||||
BlueprintName = "MacawOSX"
|
||||
ReferencedContainer = "container:Macaw.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
|
@ -7,7 +7,13 @@
|
||||
//
|
||||
|
||||
import XCTest
|
||||
#if os(OSX)
|
||||
@testable import MacawOSX
|
||||
#endif
|
||||
|
||||
#if os(iOS)
|
||||
@testable import Macaw
|
||||
#endif
|
||||
|
||||
class AnimationUtilsTests: XCTestCase {
|
||||
|
||||
|
@ -7,7 +7,14 @@
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
#if os(OSX)
|
||||
@testable import MacawOSX
|
||||
#endif
|
||||
|
||||
#if os(iOS)
|
||||
@testable import Macaw
|
||||
#endif
|
||||
|
||||
class ControlStatesTests: XCTestCase {
|
||||
|
||||
|
@ -1,5 +1,12 @@
|
||||
import XCTest
|
||||
|
||||
#if os(OSX)
|
||||
@testable import MacawOSX
|
||||
#endif
|
||||
|
||||
#if os(iOS)
|
||||
@testable import Macaw
|
||||
#endif
|
||||
|
||||
class MacawSVGTests: XCTestCase {
|
||||
|
||||
@ -105,10 +112,13 @@ class MacawSVGTests: XCTestCase {
|
||||
func testSVGImage() {
|
||||
let bundle = Bundle(for: type(of: TestUtils()))
|
||||
if let path = bundle.path(forResource: "small-logo", ofType: "png") {
|
||||
if let mimage = MImage(contentsOfFile: path), let base64Content = MImagePNGRepresentation(mimage)?.base64EncodedString() {
|
||||
let node = Image(image: mimage)
|
||||
let imageReferenceContent = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" ><image xlink:href=\"data:image/png;base64,\(String(base64Content))\" width=\"59.0\" height=\"43.0\" /></svg>"
|
||||
XCTAssertEqual(SVGSerializer.serialize(node: node), imageReferenceContent)
|
||||
if let mImage = MImage(contentsOfFile: path), let base64Content = MImagePNGRepresentation(mImage)?.base64EncodedString() {
|
||||
let imageSize = mImage.size
|
||||
let imageReferenceContent = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" ><image xlink:href=\"data:image/png;base64,\(String(base64Content))\" width=\"\(imageSize.width)\" height=\"\(imageSize.height)\" /></svg>"
|
||||
|
||||
let node = Image(image: mImage)
|
||||
let imageSerialization = SVGSerializer.serialize(node: node)
|
||||
XCTAssertEqual(imageSerialization, imageReferenceContent)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -214,11 +224,24 @@ class MacawSVGTests: XCTestCase {
|
||||
return Data()
|
||||
}
|
||||
do {
|
||||
|
||||
#if os(OSX)
|
||||
if #available(OSX 10.13, *) {
|
||||
return try JSONSerialization.data(withJSONObject: serializableNode.toDictionary(), options: [.prettyPrinted, .sortedKeys])
|
||||
} else {
|
||||
return try JSONSerialization.data(withJSONObject: serializableNode.toDictionary(), options: .prettyPrinted)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if os(iOS)
|
||||
if #available(iOS 11.0, *) {
|
||||
return try JSONSerialization.data(withJSONObject: serializableNode.toDictionary(), options: [.prettyPrinted, .sortedKeys])
|
||||
} else {
|
||||
return try JSONSerialization.data(withJSONObject: serializableNode.toDictionary(), options: .prettyPrinted)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
} catch {
|
||||
XCTFail(error.localizedDescription)
|
||||
return Data()
|
||||
@ -546,7 +569,11 @@ class MacawSVGTests: XCTestCase {
|
||||
}
|
||||
|
||||
func testColorProp04() {
|
||||
#if os(iOS)
|
||||
validateJSON("color-prop-04-t-manual")
|
||||
#elseif os(OSX)
|
||||
validateJSON("color-prop-04-t-manual-osx")
|
||||
#endif
|
||||
}
|
||||
|
||||
func testTypesBasic01() {
|
||||
|
@ -1,5 +1,11 @@
|
||||
import XCTest
|
||||
#if os(OSX)
|
||||
@testable import MacawOSX
|
||||
#endif
|
||||
|
||||
#if os(iOS)
|
||||
@testable import Macaw
|
||||
#endif
|
||||
|
||||
class MacawTests: XCTestCase {
|
||||
|
||||
|
2
MacawTests/README
Normal file
2
MacawTests/README
Normal file
@ -0,0 +1,2 @@
|
||||
To run test on iOs add Macaw to MacawTests Target Membership.
|
||||
To run test on Mac add MacawOSX to MacawTests Target Membership.
|
@ -7,7 +7,13 @@
|
||||
//
|
||||
|
||||
import XCTest
|
||||
#if os(OSX)
|
||||
@testable import MacawOSX
|
||||
#endif
|
||||
|
||||
#if os(iOS)
|
||||
@testable import Macaw
|
||||
#endif
|
||||
|
||||
class SVGParserTest: XCTestCase {
|
||||
func testParseFromOtherBundle() {
|
||||
|
@ -6,8 +6,15 @@
|
||||
// Copyright © 2018 Exyte. All rights reserved.
|
||||
//
|
||||
|
||||
#if os(OSX)
|
||||
import Foundation
|
||||
@testable import MacawOSX
|
||||
#endif
|
||||
|
||||
#if os(iOS)
|
||||
import UIKit
|
||||
@testable import Macaw
|
||||
#endif
|
||||
|
||||
protocol Initializable {
|
||||
init()
|
||||
@ -367,12 +374,23 @@ extension Path: Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
extension Polygon: Serializable {
|
||||
|
||||
func toDictionary() -> [String:Any] {
|
||||
return ["type": "Polygon", "points": points]
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if os(OSX)
|
||||
extension MacawOSX.Polygon: Serializable {
|
||||
|
||||
func toDictionary() -> [String:Any] {
|
||||
return ["type": "Polygon", "points": points]
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
extension Polyline: Serializable {
|
||||
|
||||
|
@ -1,5 +1,11 @@
|
||||
import Foundation
|
||||
import Macaw
|
||||
#if os(OSX)
|
||||
@testable import MacawOSX
|
||||
#endif
|
||||
|
||||
#if os(iOS)
|
||||
@testable import Macaw
|
||||
#endif
|
||||
|
||||
class TestUtils {
|
||||
|
||||
|
642
MacawTests/w3cSVGTests/color-prop-04-t-manual-osx.reference
Normal file
642
MacawTests/w3cSVGTests/color-prop-04-t-manual-osx.reference
Normal file
@ -0,0 +1,642 @@
|
||||
{
|
||||
"contents" : [
|
||||
{
|
||||
"contents" : [
|
||||
{
|
||||
"contents" : [
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 6513614
|
||||
},
|
||||
"form" : {
|
||||
"h" : 300,
|
||||
"type" : "Rect",
|
||||
"w" : 460,
|
||||
"x" : -230,
|
||||
"y" : -170
|
||||
},
|
||||
"node" : "Shape"
|
||||
},
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 11184810
|
||||
},
|
||||
"form" : {
|
||||
"h" : 280,
|
||||
"type" : "Rect",
|
||||
"w" : 440,
|
||||
"x" : -220,
|
||||
"y" : -160
|
||||
},
|
||||
"node" : "Shape"
|
||||
},
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 15527148
|
||||
},
|
||||
"form" : {
|
||||
"h" : 221,
|
||||
"type" : "Rect",
|
||||
"w" : 317,
|
||||
"x" : -152,
|
||||
"y" : -108
|
||||
},
|
||||
"node" : "Shape"
|
||||
},
|
||||
{
|
||||
"form" : {
|
||||
"h" : 221,
|
||||
"type" : "Rect",
|
||||
"w" : 317,
|
||||
"x" : -152,
|
||||
"y" : -108
|
||||
},
|
||||
"node" : "Shape",
|
||||
"stroke" : {
|
||||
"cap" : "butt",
|
||||
"dashes" : [
|
||||
|
||||
],
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 11184810
|
||||
},
|
||||
"join" : "miter",
|
||||
"width" : 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"contents" : [
|
||||
{
|
||||
"align" : "min",
|
||||
"baseline" : "bottom",
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 2368548
|
||||
},
|
||||
"font" : {
|
||||
"name" : "SVGFreeSansASCII,sans-serif",
|
||||
"size" : 12,
|
||||
"weight" : "normal"
|
||||
},
|
||||
"node" : "Text",
|
||||
"place" : "1, 0, 0, 1, -148, 0",
|
||||
"text" : "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. "
|
||||
},
|
||||
{
|
||||
"align" : "min",
|
||||
"baseline" : "bottom",
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 2368548
|
||||
},
|
||||
"font" : {
|
||||
"name" : "SVGFreeSansASCII,sans-serif",
|
||||
"size" : 12,
|
||||
"weight" : "normal"
|
||||
},
|
||||
"node" : "Text",
|
||||
"place" : "1, 0, 0, 1, -148, 20",
|
||||
"text" : "Vestibulum pulvinar. Duis laoreet, nunc vitae facilisis "
|
||||
},
|
||||
{
|
||||
"align" : "min",
|
||||
"baseline" : "bottom",
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 2368548
|
||||
},
|
||||
"font" : {
|
||||
"name" : "SVGFreeSansASCII,sans-serif",
|
||||
"size" : 12,
|
||||
"weight" : "normal"
|
||||
},
|
||||
"node" : "Text",
|
||||
"place" : "1, 0, 0, 1, -148, 40",
|
||||
"text" : "tristique, pede sem iaculis mi, non consectetuer lorem "
|
||||
},
|
||||
{
|
||||
"align" : "min",
|
||||
"baseline" : "bottom",
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 2368548
|
||||
},
|
||||
"font" : {
|
||||
"name" : "SVGFreeSansASCII,sans-serif",
|
||||
"size" : 12,
|
||||
"weight" : "normal"
|
||||
},
|
||||
"node" : "Text",
|
||||
"place" : "1, 0, 0, 1, -148, 60",
|
||||
"text" : "libero et est. Donec imperdiet purus sed odio. Duis "
|
||||
},
|
||||
{
|
||||
"align" : "min",
|
||||
"baseline" : "bottom",
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 2368548
|
||||
},
|
||||
"font" : {
|
||||
"name" : "SVGFreeSansASCII,sans-serif",
|
||||
"size" : 12,
|
||||
"weight" : "normal"
|
||||
},
|
||||
"node" : "Text",
|
||||
"place" : "1, 0, 0, 1, -148, 80",
|
||||
"text" : "venenatis tortor eu lectus. Suspendisse sed metus at "
|
||||
},
|
||||
{
|
||||
"align" : "min",
|
||||
"baseline" : "bottom",
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 2368548
|
||||
},
|
||||
"font" : {
|
||||
"name" : "SVGFreeSansASCII,sans-serif",
|
||||
"size" : 12,
|
||||
"weight" : "normal"
|
||||
},
|
||||
"node" : "Text",
|
||||
"place" : "1, 0, 0, 1, -148, 100",
|
||||
"text" : "metus viverra ultricies. Mauris porttitor, justo a vulputate"
|
||||
}
|
||||
],
|
||||
"node" : "Group"
|
||||
},
|
||||
{
|
||||
"contents" : [
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 12632256
|
||||
},
|
||||
"form" : {
|
||||
"h" : 190,
|
||||
"type" : "Rect",
|
||||
"w" : 118,
|
||||
"x" : -150,
|
||||
"y" : -107
|
||||
},
|
||||
"node" : "Shape"
|
||||
},
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 16185078
|
||||
},
|
||||
"form" : {
|
||||
"h" : 34,
|
||||
"type" : "Rect",
|
||||
"w" : 102,
|
||||
"x" : -143,
|
||||
"y" : 0
|
||||
},
|
||||
"node" : "Shape"
|
||||
},
|
||||
{
|
||||
"align" : "min",
|
||||
"baseline" : "bottom",
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 16777215
|
||||
},
|
||||
"font" : {
|
||||
"name" : "SVGFreeSansASCII,sans-serif",
|
||||
"size" : 20,
|
||||
"weight" : "bold"
|
||||
},
|
||||
"node" : "Text",
|
||||
"place" : "1, 0, 0, 1, -138, 24",
|
||||
"text" : "Load"
|
||||
},
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 16185078
|
||||
},
|
||||
"form" : {
|
||||
"h" : 34,
|
||||
"type" : "Rect",
|
||||
"w" : 102,
|
||||
"x" : -143,
|
||||
"y" : 40
|
||||
},
|
||||
"node" : "Shape"
|
||||
},
|
||||
{
|
||||
"align" : "min",
|
||||
"baseline" : "bottom",
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 16777215
|
||||
},
|
||||
"font" : {
|
||||
"name" : "SVGFreeSansASCII,sans-serif",
|
||||
"size" : 20,
|
||||
"weight" : "bold"
|
||||
},
|
||||
"node" : "Text",
|
||||
"place" : "1, 0, 0, 1, -138, 64",
|
||||
"text" : "Save"
|
||||
},
|
||||
{
|
||||
"form" : {
|
||||
"segments" : [
|
||||
{
|
||||
"data" : [
|
||||
-149,
|
||||
83
|
||||
],
|
||||
"type" : "M"
|
||||
},
|
||||
{
|
||||
"data" : [
|
||||
114
|
||||
],
|
||||
"type" : "h"
|
||||
},
|
||||
{
|
||||
"data" : [
|
||||
-94
|
||||
],
|
||||
"type" : "v"
|
||||
}
|
||||
],
|
||||
"type" : "Path"
|
||||
},
|
||||
"node" : "Shape",
|
||||
"stroke" : {
|
||||
"cap" : "butt",
|
||||
"dashes" : [
|
||||
|
||||
],
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 0
|
||||
},
|
||||
"join" : "miter",
|
||||
"width" : 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"form" : {
|
||||
"segments" : [
|
||||
{
|
||||
"data" : [
|
||||
-149,
|
||||
83
|
||||
],
|
||||
"type" : "M"
|
||||
},
|
||||
{
|
||||
"data" : [
|
||||
-94
|
||||
],
|
||||
"type" : "v"
|
||||
},
|
||||
{
|
||||
"data" : [
|
||||
114
|
||||
],
|
||||
"type" : "h"
|
||||
}
|
||||
],
|
||||
"type" : "Path"
|
||||
},
|
||||
"node" : "Shape",
|
||||
"stroke" : {
|
||||
"cap" : "butt",
|
||||
"dashes" : [
|
||||
|
||||
],
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 16777215
|
||||
},
|
||||
"join" : "miter",
|
||||
"width" : 4
|
||||
}
|
||||
}
|
||||
],
|
||||
"node" : "Group",
|
||||
"place" : "1, 0, 0, 1, 2, 0"
|
||||
},
|
||||
{
|
||||
"contents" : [
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 16777215
|
||||
},
|
||||
"form" : {
|
||||
"h" : 46,
|
||||
"type" : "Rect",
|
||||
"w" : 310,
|
||||
"x" : -148,
|
||||
"y" : -62
|
||||
},
|
||||
"node" : "Shape"
|
||||
},
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 0
|
||||
},
|
||||
"form" : {
|
||||
"segments" : [
|
||||
{
|
||||
"data" : [
|
||||
152,
|
||||
-52
|
||||
],
|
||||
"type" : "M"
|
||||
},
|
||||
{
|
||||
"data" : [
|
||||
10,
|
||||
-10
|
||||
],
|
||||
"type" : "l"
|
||||
},
|
||||
{
|
||||
"data" : [
|
||||
46
|
||||
],
|
||||
"type" : "v"
|
||||
},
|
||||
{
|
||||
"data" : [
|
||||
-311
|
||||
],
|
||||
"type" : "h"
|
||||
},
|
||||
{
|
||||
"data" : [
|
||||
10,
|
||||
-10
|
||||
],
|
||||
"type" : "l"
|
||||
},
|
||||
{
|
||||
"data" : [
|
||||
|
||||
],
|
||||
"type" : "z"
|
||||
}
|
||||
],
|
||||
"type" : "Path"
|
||||
},
|
||||
"node" : "Shape"
|
||||
},
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 12632256
|
||||
},
|
||||
"form" : {
|
||||
"h" : 37,
|
||||
"type" : "Rect",
|
||||
"w" : 302,
|
||||
"x" : -144,
|
||||
"y" : -58
|
||||
},
|
||||
"node" : "Shape"
|
||||
},
|
||||
{
|
||||
"align" : "min",
|
||||
"baseline" : "bottom",
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 0
|
||||
},
|
||||
"font" : {
|
||||
"name" : "SVGFreeSansASCII,sans-serif",
|
||||
"size" : 20,
|
||||
"weight" : "bold"
|
||||
},
|
||||
"node" : "Text",
|
||||
"place" : "1, 0, 0, 1, -141, -32",
|
||||
"text" : "File"
|
||||
},
|
||||
{
|
||||
"align" : "min",
|
||||
"baseline" : "bottom",
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 16777215
|
||||
},
|
||||
"font" : {
|
||||
"name" : "SVGFreeSansASCII,sans-serif",
|
||||
"size" : 20,
|
||||
"weight" : "bold"
|
||||
},
|
||||
"node" : "Text",
|
||||
"place" : "1, 0, 0, 1, -90, -32",
|
||||
"text" : "Edit"
|
||||
}
|
||||
],
|
||||
"node" : "Group"
|
||||
},
|
||||
{
|
||||
"contents" : [
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 2368548
|
||||
},
|
||||
"form" : {
|
||||
"h" : 42,
|
||||
"type" : "Rect",
|
||||
"w" : 311,
|
||||
"x" : -149,
|
||||
"y" : -106
|
||||
},
|
||||
"node" : "Shape",
|
||||
"stroke" : {
|
||||
"cap" : "butt",
|
||||
"dashes" : [
|
||||
|
||||
],
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 2569694413
|
||||
},
|
||||
"join" : "miter",
|
||||
"width" : 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"align" : "mid",
|
||||
"baseline" : "bottom",
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 0
|
||||
},
|
||||
"font" : {
|
||||
"name" : "SVGFreeSansASCII,sans-serif",
|
||||
"size" : 24,
|
||||
"weight" : "bold"
|
||||
},
|
||||
"node" : "Text",
|
||||
"place" : "1, 0, 0, 1, 5, -78",
|
||||
"text" : "Lorem"
|
||||
},
|
||||
{
|
||||
"contents" : [
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 12632256
|
||||
},
|
||||
"form" : {
|
||||
"rect" : {
|
||||
"h" : 26,
|
||||
"type" : "Rect",
|
||||
"w" : 26,
|
||||
"x" : 120,
|
||||
"y" : -99
|
||||
},
|
||||
"rx" : 8,
|
||||
"ry" : 8,
|
||||
"type" : "RoundRect"
|
||||
},
|
||||
"node" : "Shape"
|
||||
},
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 16777215
|
||||
},
|
||||
"form" : {
|
||||
"rect" : {
|
||||
"h" : 24,
|
||||
"type" : "Rect",
|
||||
"w" : 24,
|
||||
"x" : 120,
|
||||
"y" : -99
|
||||
},
|
||||
"rx" : 8,
|
||||
"ry" : 8,
|
||||
"type" : "RoundRect"
|
||||
},
|
||||
"node" : "Shape"
|
||||
},
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 9276813
|
||||
},
|
||||
"form" : {
|
||||
"rect" : {
|
||||
"h" : 24,
|
||||
"type" : "Rect",
|
||||
"w" : 24,
|
||||
"x" : 122,
|
||||
"y" : -97
|
||||
},
|
||||
"rx" : 8,
|
||||
"ry" : 8,
|
||||
"type" : "RoundRect"
|
||||
},
|
||||
"node" : "Shape"
|
||||
},
|
||||
{
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 12632256
|
||||
},
|
||||
"form" : {
|
||||
"rect" : {
|
||||
"h" : 22,
|
||||
"type" : "Rect",
|
||||
"w" : 22,
|
||||
"x" : 122,
|
||||
"y" : -97
|
||||
},
|
||||
"rx" : 8,
|
||||
"ry" : 8,
|
||||
"type" : "RoundRect"
|
||||
},
|
||||
"node" : "Shape"
|
||||
}
|
||||
],
|
||||
"node" : "Group"
|
||||
}
|
||||
],
|
||||
"node" : "Group"
|
||||
}
|
||||
],
|
||||
"node" : "Group",
|
||||
"place" : "1, 0, 0, 1, 240, 180"
|
||||
}
|
||||
],
|
||||
"node" : "Group"
|
||||
},
|
||||
{
|
||||
"contents" : [
|
||||
{
|
||||
"align" : "min",
|
||||
"baseline" : "bottom",
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 0
|
||||
},
|
||||
"font" : {
|
||||
"name" : "SVGFreeSansASCII,sans-serif",
|
||||
"size" : 32,
|
||||
"weight" : "normal"
|
||||
},
|
||||
"node" : "Text",
|
||||
"place" : "1, 0, 0, 1, 10, 340",
|
||||
"text" : "$Revision: 1.7 $"
|
||||
}
|
||||
],
|
||||
"node" : "Group"
|
||||
},
|
||||
{
|
||||
"form" : {
|
||||
"h" : 358,
|
||||
"type" : "Rect",
|
||||
"w" : 478,
|
||||
"x" : 1,
|
||||
"y" : 1
|
||||
},
|
||||
"node" : "Shape",
|
||||
"stroke" : {
|
||||
"cap" : "butt",
|
||||
"dashes" : [
|
||||
|
||||
],
|
||||
"fill" : {
|
||||
"type" : "Color",
|
||||
"val" : 0
|
||||
},
|
||||
"join" : "miter",
|
||||
"width" : 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"layout" : {
|
||||
"scalingMode" : "meet",
|
||||
"svgSize" : {
|
||||
"height" : "100.0%",
|
||||
"width" : "100.0%"
|
||||
},
|
||||
"viewBox" : {
|
||||
"h" : 360,
|
||||
"type" : "Rect",
|
||||
"w" : 480,
|
||||
"x" : 0,
|
||||
"y" : 0
|
||||
},
|
||||
"xAligningMode" : "mid",
|
||||
"yAligningMode" : "mid"
|
||||
},
|
||||
"node" : "Canvas"
|
||||
}
|
96
MacawTests/w3cSVGTests/color-prop-04-t-manual-osx.svg
Normal file
96
MacawTests/w3cSVGTests/color-prop-04-t-manual-osx.svg
Normal file
@ -0,0 +1,96 @@
|
||||
<svg version="1.1" baseProfile="tiny" id="svg-root"
|
||||
width="100%" height="100%" viewBox="0 0 480 360"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!--======================================================================-->
|
||||
<!--= SVG 1.1 2nd Edition Test Case =-->
|
||||
<!--======================================================================-->
|
||||
<!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
|
||||
<!--= Institute of Technology, European Research Consortium for =-->
|
||||
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
|
||||
<!--= All Rights Reserved. =-->
|
||||
<!--= See http://www.w3.org/Consortium/Legal/. =-->
|
||||
<!--======================================================================-->
|
||||
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
|
||||
template-version="1.4" reviewer="[reviewer]" author="CL" status="accepted"
|
||||
version="$Revision: 1.7 $" testname="$RCSfile: color-prop-04-t.svg,v $">
|
||||
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/color.html#ColorProperty">
|
||||
<p>
|
||||
This tests the 'system' colors.
|
||||
</p>
|
||||
</d:testDescription>
|
||||
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Run the test. No interaction required.</p>
|
||||
</d:operatorScript>
|
||||
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
This test has no specific pass criteria, except that no error must be indicated.
|
||||
</p>
|
||||
<p>
|
||||
The colors on your screen might not match the reference
|
||||
image at all, but they should at minimum be legible and should
|
||||
preferably resemble the colors used on menus and other user interface
|
||||
elements on your computer, pda or phone.
|
||||
</p>
|
||||
</d:passCriteria>
|
||||
</d:SVGTestCase>
|
||||
<title id="test-title">$RCSfile: color-prop-04-t.svg,v $</title>
|
||||
<defs>
|
||||
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
|
||||
<font-face-src>
|
||||
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
|
||||
</font-face-src>
|
||||
</font-face>
|
||||
</defs>
|
||||
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
|
||||
<g id="Scene_1" transform="translate(240, 180)">
|
||||
<rect x="-230" y="-170" width="460" height="300" fill="Background"/>
|
||||
<rect x="-220" y="-160" width="440" height="280" fill="AppWorkspace"/>
|
||||
<rect x="-152" y="-108" width="317" height="221" fill="Window"/>
|
||||
<rect x="-152" y="-108" width="317" height="221" fill="none" stroke-width="3" stroke="WindowFrame"/>
|
||||
<g id="contents" font-size="12" fill="WindowText">
|
||||
<text x="-148" y="0">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. </text>
|
||||
<text x="-148" y="20">Vestibulum pulvinar. Duis laoreet, nunc vitae facilisis </text>
|
||||
<text x="-148" y="40">tristique, pede sem iaculis mi, non consectetuer lorem </text>
|
||||
<text x="-148" y="60">libero et est. Donec imperdiet purus sed odio. Duis </text>
|
||||
<text x="-148" y="80">venenatis tortor eu lectus. Suspendisse sed metus at </text>
|
||||
<text x="-148" y="100">metus viverra ultricies. Mauris porttitor, justo a vulputate</text>
|
||||
</g>
|
||||
<g id="dropdown" transform="translate(2,0)">
|
||||
<rect x="-150" y="-107" width="118" height="190" fill="ThreeDFace" id="drop-bg"/>
|
||||
<rect x="-143" y="0" width="102" height="34" fill="Menu"/>
|
||||
<text x="-138" y="24" font-size="20" font-weight="bold" fill="MenuText">Load</text>
|
||||
<rect x="-143" y="40" width="102" height="34" fill="Menu"/>
|
||||
<text x="-138" y="64" font-size="20" font-weight="bold" fill="MenuText">Save</text>
|
||||
<path d="M-149 83 h114 v-94" stroke-width="4" stroke="ThreeDDarkShadow" fill="none"/>
|
||||
<path d="M-149 83 v-94 h114" stroke-width="4" stroke="ThreeDLightShadow" fill="none"/>
|
||||
</g>
|
||||
<g id="menubar">
|
||||
<rect x="-148" y="-62" width="310" height="46" fill="ThreeDLightShadow"/>
|
||||
<path d="M152 -52 l 10 -10 v 46 h -311 l10-10 z" fill="ThreeDDarkShadow"/>
|
||||
<rect x="-144" y="-58" width="302" height="37" fill="ThreeDFace"/>
|
||||
<text x="-141" y="-32" font-size="20" font-weight="bold" fill="HighlightText">File</text>
|
||||
<text x="-90" y="-32" font-size="20" font-weight="bold" fill="MenuText">Edit</text>
|
||||
</g>
|
||||
<g id="windowdecoration">
|
||||
<rect x="-149" y="-106" width="311" height="42" fill="ActiveCaption" stroke-width="4" stroke="ActiveBorder" id="windowbar"/>
|
||||
<text x="5" y="-78" text-anchor="middle" font-size="24" font-weight="bold" fill="CaptionText">Lorem</text>
|
||||
<g id="button">
|
||||
<rect x="120" y="-99" rx="8" width="26" height="26" fill="ButtonFace"/>
|
||||
<rect x="120" y="-99" rx="8" width="24" height="24" fill="ButtonHighlight"/>
|
||||
<rect x="122" y="-97" rx="8" width="24" height="24" fill="ButtonShadow"/>
|
||||
<rect x="122" y="-97" rx="8" width="22" height="22" fill="ButtonFace"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
|
||||
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
|
||||
</g>
|
||||
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
|
||||
<!-- comment out this watermark once the test is approved -->
|
||||
<!--<g id="draft-watermark">
|
||||
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
|
||||
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
|
||||
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
|
||||
</g>-->
|
||||
</svg>
|
After Width: | Height: | Size: 5.7 KiB |
Loading…
Reference in New Issue
Block a user