Skip to content

Commit 5fa05cf

Browse files
committed
Fix unit tests
1 parent b492207 commit 5fa05cf

32 files changed

+316
-767
lines changed

src/test/suite/fixtures/recorded/inference/bringOddToLine.yml

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,33 @@ command:
44
actionName: replaceWithTarget
55
partialTargets:
66
- type: primitive
7-
mark: { type: decoratedSymbol, symbolColor: default, character: o }
8-
- { type: primitive, selectionType: line }
7+
mark: {type: decoratedSymbol, symbolColor: default, character: o}
8+
- {type: primitive, selectionType: line}
99
extraArgs: []
1010
marks:
1111
default.o:
12-
start: { line: 0, character: 0 }
13-
end: { line: 0, character: 5 }
12+
start: {line: 0, character: 0}
13+
end: {line: 0, character: 5}
1414
initialState:
1515
documentContents: |-
1616
const foo = "hello";
1717
1818
const bar = "hello";
1919
selections:
20-
- anchor: { line: 2, character: 18 }
21-
active: { line: 2, character: 18 }
20+
- anchor: {line: 2, character: 18}
21+
active: {line: 2, character: 18}
2222
finalState:
2323
documentContents: |-
2424
const foo = "hello";
2525
2626
const
2727
selections:
28-
- anchor: { line: 2, character: 5 }
29-
active: { line: 2, character: 5 }
28+
- anchor: {line: 2, character: 5}
29+
active: {line: 2, character: 5}
3030
thatMark:
31-
- anchor: { line: 2, character: 0 }
32-
active: { line: 2, character: 5 }
31+
- anchor: {line: 2, character: 0}
32+
active: {line: 2, character: 5}
3333
sourceMark:
34-
- anchor: { line: 0, character: 0 }
35-
active: { line: 0, character: 5 }
36-
fullTargets:
37-
[
38-
{
39-
type: primitive,
40-
mark: { type: decoratedSymbol, symbolColor: default, character: o },
41-
selectionType: token,
42-
position: contents,
43-
insideOutsideType: null,
44-
modifier: { type: identity },
45-
},
46-
{
47-
type: primitive,
48-
mark: { type: cursor },
49-
selectionType: line,
50-
position: contents,
51-
insideOutsideType: null,
52-
modifier: { type: identity },
53-
},
54-
]
34+
- anchor: {line: 0, character: 0}
35+
active: {line: 0, character: 5}
36+
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: o}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}, {type: primitive, mark: {type: cursor}, selectionType: line, position: contents, insideOutsideType: null, modifier: {type: identity}}]

src/test/suite/fixtures/recorded/inference/bringOddToState.yml

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,34 @@ command:
44
actionName: replaceWithTarget
55
partialTargets:
66
- type: primitive
7-
mark: { type: decoratedSymbol, symbolColor: default, character: o }
7+
mark: {type: decoratedSymbol, symbolColor: default, character: o}
88
- type: primitive
9-
modifier:
10-
{ type: containingScope, scopeType: statement, includeSiblings: false }
9+
modifier: {type: containingScope, scopeType: statement, includeSiblings: false}
1110
extraArgs: []
1211
marks:
1312
default.o:
14-
start: { line: 0, character: 0 }
15-
end: { line: 0, character: 5 }
13+
start: {line: 0, character: 0}
14+
end: {line: 0, character: 5}
1615
initialState:
1716
documentContents: |-
1817
const foo = "hello";
1918
2019
const bar = "hello";
2120
selections:
22-
- anchor: { line: 2, character: 18 }
23-
active: { line: 2, character: 18 }
21+
- anchor: {line: 2, character: 18}
22+
active: {line: 2, character: 18}
2423
finalState:
2524
documentContents: |-
2625
const foo = "hello";
2726
2827
const
2928
selections:
30-
- anchor: { line: 2, character: 5 }
31-
active: { line: 2, character: 5 }
29+
- anchor: {line: 2, character: 5}
30+
active: {line: 2, character: 5}
3231
thatMark:
33-
- anchor: { line: 2, character: 0 }
34-
active: { line: 2, character: 5 }
32+
- anchor: {line: 2, character: 0}
33+
active: {line: 2, character: 5}
3534
sourceMark:
36-
- anchor: { line: 0, character: 0 }
37-
active: { line: 0, character: 5 }
38-
fullTargets:
39-
[
40-
{
41-
type: primitive,
42-
mark: { type: decoratedSymbol, symbolColor: default, character: o },
43-
selectionType: token,
44-
position: contents,
45-
insideOutsideType: null,
46-
modifier: { type: identity },
47-
},
48-
{
49-
type: primitive,
50-
mark: { type: cursor },
51-
selectionType: token,
52-
position: contents,
53-
insideOutsideType: null,
54-
modifier:
55-
{ type: containingScope, scopeType: statement, includeSiblings: false },
56-
},
57-
]
35+
- anchor: {line: 0, character: 0}
36+
active: {line: 0, character: 5}
37+
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: o}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}, {type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]

src/test/suite/fixtures/recorded/inference/bringOddToToken.yml

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,33 @@ command:
44
actionName: replaceWithTarget
55
partialTargets:
66
- type: primitive
7-
mark: { type: decoratedSymbol, symbolColor: default, character: o }
8-
- { type: primitive, selectionType: token }
7+
mark: {type: decoratedSymbol, symbolColor: default, character: o}
8+
- {type: primitive, selectionType: token}
99
extraArgs: []
1010
marks:
1111
default.o:
12-
start: { line: 0, character: 0 }
13-
end: { line: 0, character: 5 }
12+
start: {line: 0, character: 0}
13+
end: {line: 0, character: 5}
1414
initialState:
1515
documentContents: |-
1616
const foo = "hello";
1717
1818
const bar = "hello";
1919
selections:
20-
- anchor: { line: 2, character: 18 }
21-
active: { line: 2, character: 18 }
20+
- anchor: {line: 2, character: 18}
21+
active: {line: 2, character: 18}
2222
finalState:
2323
documentContents: |-
2424
const foo = "hello";
2525
2626
const bar = "const";
2727
selections:
28-
- anchor: { line: 2, character: 18 }
29-
active: { line: 2, character: 18 }
28+
- anchor: {line: 2, character: 18}
29+
active: {line: 2, character: 18}
3030
thatMark:
31-
- anchor: { line: 2, character: 13 }
32-
active: { line: 2, character: 18 }
31+
- anchor: {line: 2, character: 13}
32+
active: {line: 2, character: 18}
3333
sourceMark:
34-
- anchor: { line: 0, character: 0 }
35-
active: { line: 0, character: 5 }
36-
fullTargets:
37-
[
38-
{
39-
type: primitive,
40-
mark: { type: decoratedSymbol, symbolColor: default, character: o },
41-
selectionType: token,
42-
position: contents,
43-
insideOutsideType: null,
44-
modifier: { type: identity },
45-
},
46-
{
47-
type: primitive,
48-
mark: { type: cursorToken },
49-
selectionType: token,
50-
position: contents,
51-
insideOutsideType: null,
52-
modifier: { type: identity },
53-
},
54-
]
34+
- anchor: {line: 0, character: 0}
35+
active: {line: 0, character: 5}
36+
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: o}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}, {type: primitive, mark: {type: cursorToken}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}]

src/test/suite/fixtures/recorded/inference/takeOddPastEndOfState.yml

Lines changed: 11 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,71 +6,36 @@ command:
66
- type: range
77
start:
88
type: primitive
9-
mark: { type: decoratedSymbol, symbolColor: default, character: o }
9+
mark: {type: decoratedSymbol, symbolColor: default, character: o}
1010
end:
1111
type: primitive
1212
position: after
1313
insideOutsideType: inside
14-
modifier:
15-
{
16-
type: containingScope,
17-
scopeType: statement,
18-
includeSiblings: false,
19-
}
14+
modifier: {type: containingScope, scopeType: statement, includeSiblings: false}
2015
excludeStart: false
2116
excludeEnd: false
2217
extraArgs: []
2318
marks:
2419
default.o:
25-
start: { line: 0, character: 0 }
26-
end: { line: 0, character: 5 }
20+
start: {line: 0, character: 0}
21+
end: {line: 0, character: 5}
2722
initialState:
2823
documentContents: |-
2924
const foo = "hello";
3025
3126
const bar = "hello";
3227
selections:
33-
- anchor: { line: 2, character: 18 }
34-
active: { line: 2, character: 18 }
28+
- anchor: {line: 2, character: 18}
29+
active: {line: 2, character: 18}
3530
finalState:
3631
documentContents: |-
3732
const foo = "hello";
3833
3934
const bar = "hello";
4035
selections:
41-
- anchor: { line: 0, character: 0 }
42-
active: { line: 0, character: 20 }
36+
- anchor: {line: 0, character: 0}
37+
active: {line: 0, character: 20}
4338
thatMark:
44-
- anchor: { line: 0, character: 0 }
45-
active: { line: 0, character: 20 }
46-
fullTargets:
47-
[
48-
{
49-
type: range,
50-
excludeAnchor: false,
51-
excludeActive: false,
52-
anchor:
53-
{
54-
type: primitive,
55-
mark: { type: decoratedSymbol, symbolColor: default, character: o },
56-
selectionType: token,
57-
position: contents,
58-
insideOutsideType: inside,
59-
modifier: { type: identity },
60-
},
61-
active:
62-
{
63-
type: primitive,
64-
mark: { type: decoratedSymbol, symbolColor: default, character: o },
65-
selectionType: token,
66-
position: after,
67-
insideOutsideType: inside,
68-
modifier:
69-
{
70-
type: containingScope,
71-
scopeType: statement,
72-
includeSiblings: false,
73-
},
74-
},
75-
},
76-
]
39+
- anchor: {line: 0, character: 0}
40+
active: {line: 0, character: 20}
41+
fullTargets: [{type: range, excludeAnchor: false, excludeActive: false, anchor: {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: o}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: identity}}, active: {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: o}, selectionType: token, position: after, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}}]

src/test/suite/fixtures/recorded/inference/takeOddPastLine.yml

Lines changed: 11 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,57 +6,32 @@ command:
66
- type: range
77
start:
88
type: primitive
9-
mark: { type: decoratedSymbol, symbolColor: default, character: o }
10-
end: { type: primitive, selectionType: line }
9+
mark: {type: decoratedSymbol, symbolColor: default, character: o}
10+
end: {type: primitive, selectionType: line}
1111
excludeStart: false
1212
excludeEnd: false
1313
extraArgs: []
1414
marks:
1515
default.o:
16-
start: { line: 0, character: 0 }
17-
end: { line: 0, character: 5 }
16+
start: {line: 0, character: 0}
17+
end: {line: 0, character: 5}
1818
initialState:
1919
documentContents: |-
2020
const foo = "hello";
2121
2222
const bar = "hello";
2323
selections:
24-
- anchor: { line: 2, character: 18 }
25-
active: { line: 2, character: 18 }
24+
- anchor: {line: 2, character: 18}
25+
active: {line: 2, character: 18}
2626
finalState:
2727
documentContents: |-
2828
const foo = "hello";
2929
3030
const bar = "hello";
3131
selections:
32-
- anchor: { line: 0, character: 0 }
33-
active: { line: 2, character: 20 }
32+
- anchor: {line: 0, character: 0}
33+
active: {line: 2, character: 20}
3434
thatMark:
35-
- anchor: { line: 0, character: 0 }
36-
active: { line: 2, character: 20 }
37-
fullTargets:
38-
[
39-
{
40-
type: range,
41-
excludeAnchor: false,
42-
excludeActive: false,
43-
anchor:
44-
{
45-
type: primitive,
46-
mark: { type: decoratedSymbol, symbolColor: default, character: o },
47-
selectionType: token,
48-
position: contents,
49-
insideOutsideType: inside,
50-
modifier: { type: identity },
51-
},
52-
active:
53-
{
54-
type: primitive,
55-
mark: { type: cursor },
56-
selectionType: line,
57-
position: contents,
58-
insideOutsideType: inside,
59-
modifier: { type: identity },
60-
},
61-
},
62-
]
35+
- anchor: {line: 0, character: 0}
36+
active: {line: 2, character: 20}
37+
fullTargets: [{type: range, excludeAnchor: false, excludeActive: false, anchor: {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: o}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: identity}}, active: {type: primitive, mark: {type: cursor}, selectionType: line, position: contents, insideOutsideType: inside, modifier: {type: identity}}}]

0 commit comments

Comments
 (0)