mirror of
https://github.com/github/semantic.git
synced 2024-12-28 09:21:35 +03:00
fix test
This commit is contained in:
parent
d99000562b
commit
93808be85f
@ -63,15 +63,15 @@
|
|||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
<CommandLineArguments>
|
<CommandLineArguments>
|
||||||
<CommandLineArgument
|
<CommandLineArgument
|
||||||
argument = "--unified"
|
argument = "--split"
|
||||||
isEnabled = "NO">
|
isEnabled = "NO">
|
||||||
</CommandLineArgument>
|
</CommandLineArgument>
|
||||||
<CommandLineArgument
|
<CommandLineArgument
|
||||||
argument = "https://raw.githubusercontent.com/jquery/jquery/2.1.0/src/effects.js"
|
argument = "file:///Users/vera/Library/Developer/Xcode/DerivedData/Doubt-gibmbsxjgxflybarnuoisglmgdll/Build/Products/Debug/before.json"
|
||||||
isEnabled = "YES">
|
isEnabled = "YES">
|
||||||
</CommandLineArgument>
|
</CommandLineArgument>
|
||||||
<CommandLineArgument
|
<CommandLineArgument
|
||||||
argument = "https://raw.githubusercontent.com/jquery/jquery/2.1.4/src/effects.js"
|
argument = "file:///Users/vera/Library/Developer/Xcode/DerivedData/Doubt-gibmbsxjgxflybarnuoisglmgdll/Build/Products/Debug/after.json"
|
||||||
isEnabled = "YES">
|
isEnabled = "YES">
|
||||||
</CommandLineArgument>
|
</CommandLineArgument>
|
||||||
</CommandLineArguments>
|
</CommandLineArguments>
|
||||||
|
@ -16,10 +16,10 @@ final class JSONParserTests: XCTestCase {
|
|||||||
|
|
||||||
let expected: Cofree<JSONLeaf, Range<Int>> = Cofree(0..<42, .Keyed(["hello": fixedPairs]))
|
let expected: Cofree<JSONLeaf, Range<Int>> = Cofree(0..<42, .Keyed(["hello": fixedPairs]))
|
||||||
let actual = Madness.parse(json, input: dictWithArray).right!
|
let actual = Madness.parse(json, input: dictWithArray).right!
|
||||||
let firstIndex = actual.extract
|
let firstIndex = actual.extract.1
|
||||||
let new: Cofree<JSONLeaf, Range<Int>> = actual.map({ range in
|
let new: Cofree<JSONLeaf, Range<Int>> = actual.map({ tuple in
|
||||||
let startI: Int = firstIndex.startIndex.distanceTo(range.startIndex)
|
let startI: Int = firstIndex.startIndex.distanceTo(tuple.1.startIndex)
|
||||||
let endI: Int = firstIndex.startIndex.distanceTo(range.endIndex)
|
let endI: Int = firstIndex.startIndex.distanceTo(tuple.1.endIndex)
|
||||||
return Range(start: startI, end: endI)
|
return Range(start: startI, end: endI)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user