mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
[trace] fixed a minor issue in trace#toString()
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
This commit is contained in:
parent
46cb782598
commit
92f379602e
2 changed files with 24 additions and 1 deletions
|
@ -147,7 +147,7 @@ import static extension com.google.common.collect.Multimaps.*
|
|||
val closes = inserts.filter[!open].sortBy[-sortKey].map[render(width)].join(",")
|
||||
val s1 = if(opens.isEmpty) "" else "[" + opens + "["
|
||||
val s2 = if(closes.isEmpty) "" else "]" + closes + "]"
|
||||
return s1 + s2
|
||||
return s2 + s1
|
||||
}
|
||||
|
||||
def protected List<String> render(File file, int width) {
|
||||
|
|
|
@ -79,6 +79,29 @@ class TraceRegionToStringTest {
|
|||
1: }
|
||||
'''
|
||||
}
|
||||
|
||||
@Test def void twoBounding() {
|
||||
val tester = new TraceRegionToStringTester
|
||||
tester.localText = '''
|
||||
foobar
|
||||
'''
|
||||
tester.remote1 = '''
|
||||
bazbuz
|
||||
'''
|
||||
tester.trace = new Region(0, 6, #[new Location(0, 6, tester.uri1)]) => [
|
||||
addChild(0, 3, #[new Location(0, 3)])
|
||||
addChild(3, 3, #[new Location(3, 3)])
|
||||
]
|
||||
tester === '''
|
||||
------- local1 ------- | ------ remote1 -------
|
||||
[1,2[foo]2][3[bar]3,1] | [1,2[baz]2][3[buz]3,1]
|
||||
-----------------------------------------------
|
||||
1: D 0-6 Region -> Location[0,6,remote1] {
|
||||
2: D 0-3 Region -> Location[0,3]
|
||||
3: D 3-3 Region -> Location[3,3]
|
||||
1: }
|
||||
'''
|
||||
}
|
||||
|
||||
@Test def void twoFrame1() {
|
||||
val tester = new TraceRegionToStringTester
|
||||
|
|
Loading…
Reference in a new issue