mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Test that locations are sequenced in depth-first pre-order.
This commit is contained in:
parent
59ef9b1eb4
commit
839a62ff0c
@ -43,6 +43,10 @@ final class LocationTests: XCTestCase {
|
||||
func testCanReturnToStartOfExplorationFromArbitrarilyDeepNodes() {
|
||||
assert(term.explore().down?.right?.right?.down?.right?.root.it, ==, term)
|
||||
}
|
||||
|
||||
func testSequenceIsPreOrderDepthFirstTraversal() {
|
||||
assert(term.explore().map { $0.it.extract }, ==, [ 0, 1, 2, 3, 5, 4 ])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user