mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-20 17:17:33 +03:00
Merge pull request #282 from yonaskolb/yaml_quoted_values
Update Yams to fix quoted values
This commit is contained in:
commit
35e1a59eaa
@ -69,8 +69,8 @@
|
||||
"repositoryURL": "https://github.com/jpsim/Yams.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "de06b2c819bb12e95bcdf75075b3336a8890e67c",
|
||||
"version": "0.6.0"
|
||||
"revision": "6652aa7b793d3c8a075db0614acb575fcaecf457",
|
||||
"version": "0.7.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ noQuote: "NO"
|
||||
int: 1
|
||||
intQuote: "1"
|
||||
float: 3.2
|
||||
floatQuote: !!str "10.10"
|
||||
floatQuote: "10.10"
|
||||
string: hello
|
||||
stringQuote: "hello"
|
||||
space: " "
|
||||
|
@ -56,10 +56,10 @@ func specLoadingTests() {
|
||||
"false": false,
|
||||
"yes": true,
|
||||
"no": false,
|
||||
"yesQuote": true,
|
||||
"noQuote": false,
|
||||
"yesQuote": "YES",
|
||||
"noQuote": "NO",
|
||||
"int": 1,
|
||||
"intQuote": 1,
|
||||
"intQuote": "1",
|
||||
"float": 3.2,
|
||||
"floatQuote": "10.10",
|
||||
"string": "hello",
|
||||
@ -71,9 +71,16 @@ func specLoadingTests() {
|
||||
"arrayLiteral": [1, 2],
|
||||
"arrayList": [1, 2],
|
||||
]
|
||||
|
||||
for (key, expectedValue) in expectedDictionary {
|
||||
guard let parsedValue = dictionary[key] else {
|
||||
throw failure("\(key) does not exist")
|
||||
}
|
||||
if String(describing: expectedValue) != String(describing: parsedValue) {
|
||||
throw failure("\(key): \(parsedValue) does not equal \(expectedValue)")
|
||||
}
|
||||
}
|
||||
if !(dictionary as NSDictionary).isEqual(expectedDictionary) {
|
||||
throw failure("parsed yaml types don't match")
|
||||
throw failure("parsed yaml types don't match:\n\nParsed:\n\t\(dictionary.map { "\($0.key): \($0.value)" }.joined(separator: "\n\t"))\nExpected:\n\t\(expectedDictionary.map { "\($0.key): \($0.value)" }.joined(separator: "\n\t"))")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user