Skip to content

Commit 2a84b42

Browse files
committed
Fix tests
1 parent a52473f commit 2a84b42

25 files changed

+533
-258
lines changed

src/test/suite/fixtures/recorded/languages/cpp/elseStateWrapThis.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ command:
44
actionName: wrapWithSnippet
55
partialTargets:
66
- type: primitive
7-
mark: {type: cursor}
8-
extraArgs: [cursorless.wrappers.ifElseStatementElseBranch]
7+
mark: { type: cursor }
8+
extraArgs: [ifElseStatement/alternative]
99
marks: {}
1010
initialState:
1111
documentContents: int foo = 0;
1212
selections:
13-
- anchor: {line: 0, character: 6}
14-
active: {line: 0, character: 6}
13+
- anchor: { line: 0, character: 6 }
14+
active: { line: 0, character: 6 }
1515
finalState:
1616
documentContents: |-
1717
if () {
@@ -20,9 +20,20 @@ finalState:
2020
int foo = 0;
2121
}
2222
selections:
23-
- anchor: {line: 0, character: 4}
24-
active: {line: 0, character: 4}
23+
- anchor: { line: 0, character: 4 }
24+
active: { line: 0, character: 4 }
2525
thatMark:
26-
- anchor: {line: 0, character: 0}
27-
active: {line: 4, character: 1}
28-
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
26+
- anchor: { line: 0, character: 0 }
27+
active: { line: 4, character: 1 }
28+
fullTargets:
29+
[
30+
{
31+
type: primitive,
32+
mark: { type: cursor },
33+
selectionType: token,
34+
position: contents,
35+
insideOutsideType: inside,
36+
modifier:
37+
{ type: containingScope, scopeType: statement, includeSiblings: false },
38+
},
39+
]

src/test/suite/fixtures/recorded/languages/cpp/ifElseWrapThis.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ command:
44
actionName: wrapWithSnippet
55
partialTargets:
66
- type: primitive
7-
mark: {type: cursor}
8-
extraArgs: [cursorless.wrappers.ifElseStatementIfBranch]
7+
mark: { type: cursor }
8+
extraArgs: [ifElseStatement/consequence]
99
marks: {}
1010
initialState:
1111
documentContents: int foo = 0;
1212
selections:
13-
- anchor: {line: 0, character: 6}
14-
active: {line: 0, character: 6}
13+
- anchor: { line: 0, character: 6 }
14+
active: { line: 0, character: 6 }
1515
finalState:
1616
documentContents: |-
1717
if () {
@@ -20,9 +20,20 @@ finalState:
2020
2121
}
2222
selections:
23-
- anchor: {line: 0, character: 4}
24-
active: {line: 0, character: 4}
23+
- anchor: { line: 0, character: 4 }
24+
active: { line: 0, character: 4 }
2525
thatMark:
26-
- anchor: {line: 0, character: 0}
27-
active: {line: 4, character: 1}
28-
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
26+
- anchor: { line: 0, character: 0 }
27+
active: { line: 4, character: 1 }
28+
fullTargets:
29+
[
30+
{
31+
type: primitive,
32+
mark: { type: cursor },
33+
selectionType: token,
34+
position: contents,
35+
insideOutsideType: inside,
36+
modifier:
37+
{ type: containingScope, scopeType: statement, includeSiblings: false },
38+
},
39+
]

src/test/suite/fixtures/recorded/languages/cpp/ifStateWrapThis.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,34 @@ command:
44
actionName: wrapWithSnippet
55
partialTargets:
66
- type: primitive
7-
mark: {type: cursor}
8-
extraArgs: [cursorless.wrappers.ifStatement]
7+
mark: { type: cursor }
8+
extraArgs: [ifStatement/consequence]
99
marks: {}
1010
initialState:
1111
documentContents: int foo = 0;
1212
selections:
13-
- anchor: {line: 0, character: 6}
14-
active: {line: 0, character: 6}
13+
- anchor: { line: 0, character: 6 }
14+
active: { line: 0, character: 6 }
1515
finalState:
1616
documentContents: |-
1717
if () {
1818
int foo = 0;
1919
}
2020
selections:
21-
- anchor: {line: 0, character: 4}
22-
active: {line: 0, character: 4}
21+
- anchor: { line: 0, character: 4 }
22+
active: { line: 0, character: 4 }
2323
thatMark:
24-
- anchor: {line: 0, character: 0}
25-
active: {line: 2, character: 1}
26-
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
24+
- anchor: { line: 0, character: 0 }
25+
active: { line: 2, character: 1 }
26+
fullTargets:
27+
[
28+
{
29+
type: primitive,
30+
mark: { type: cursor },
31+
selectionType: token,
32+
position: contents,
33+
insideOutsideType: inside,
34+
modifier:
35+
{ type: containingScope, scopeType: statement, includeSiblings: false },
36+
},
37+
]

src/test/suite/fixtures/recorded/languages/cpp/tryCatchWrapThis.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ command:
44
actionName: wrapWithSnippet
55
partialTargets:
66
- type: primitive
7-
mark: {type: cursor}
8-
extraArgs: [cursorless.wrappers.tryCatchStatement]
7+
mark: { type: cursor }
8+
extraArgs: [tryCatchStatement/body]
99
marks: {}
1010
initialState:
1111
documentContents: int foo = 0;
1212
selections:
13-
- anchor: {line: 0, character: 6}
14-
active: {line: 0, character: 6}
13+
- anchor: { line: 0, character: 6 }
14+
active: { line: 0, character: 6 }
1515
finalState:
1616
documentContents: |-
1717
try {
@@ -20,9 +20,20 @@ finalState:
2020
2121
}
2222
selections:
23-
- anchor: {line: 2, character: 9}
24-
active: {line: 2, character: 9}
23+
- anchor: { line: 2, character: 9 }
24+
active: { line: 2, character: 9 }
2525
thatMark:
26-
- anchor: {line: 0, character: 0}
27-
active: {line: 4, character: 1}
28-
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
26+
- anchor: { line: 0, character: 0 }
27+
active: { line: 4, character: 1 }
28+
fullTargets:
29+
[
30+
{
31+
type: primitive,
32+
mark: { type: cursor },
33+
selectionType: token,
34+
position: contents,
35+
insideOutsideType: inside,
36+
modifier:
37+
{ type: containingScope, scopeType: statement, includeSiblings: false },
38+
},
39+
]

src/test/suite/fixtures/recorded/languages/cpp/tryCatchWrapThis2.yml

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ command:
44
actionName: wrapWithSnippet
55
partialTargets:
66
- type: primitive
7-
mark: {type: cursor}
8-
extraArgs: [cursorless.wrappers.tryCatchStatement]
7+
mark: { type: cursor }
8+
extraArgs: [tryCatchStatement/body]
99
marks: {}
1010
initialState:
1111
documentContents: |-
@@ -15,10 +15,10 @@ initialState:
1515
1616
int bar = 1;
1717
selections:
18-
- anchor: {line: 4, character: 0}
19-
active: {line: 4, character: 0}
20-
- anchor: {line: 0, character: 0}
21-
active: {line: 0, character: 0}
18+
- anchor: { line: 4, character: 0 }
19+
active: { line: 4, character: 0 }
20+
- anchor: { line: 0, character: 0 }
21+
active: { line: 0, character: 0 }
2222
finalState:
2323
documentContents: |-
2424
try {
@@ -35,13 +35,24 @@ finalState:
3535
3636
}
3737
selections:
38-
- anchor: {line: 10, character: 9}
39-
active: {line: 10, character: 9}
40-
- anchor: {line: 4, character: 9}
41-
active: {line: 4, character: 9}
38+
- anchor: { line: 10, character: 9 }
39+
active: { line: 10, character: 9 }
40+
- anchor: { line: 4, character: 9 }
41+
active: { line: 4, character: 9 }
4242
thatMark:
43-
- anchor: {line: 8, character: 0}
44-
active: {line: 12, character: 1}
45-
- anchor: {line: 0, character: 0}
46-
active: {line: 6, character: 1}
47-
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
43+
- anchor: { line: 8, character: 0 }
44+
active: { line: 12, character: 1 }
45+
- anchor: { line: 0, character: 0 }
46+
active: { line: 6, character: 1 }
47+
fullTargets:
48+
[
49+
{
50+
type: primitive,
51+
mark: { type: cursor },
52+
selectionType: token,
53+
position: contents,
54+
insideOutsideType: inside,
55+
modifier:
56+
{ type: containingScope, scopeType: statement, includeSiblings: false },
57+
},
58+
]

src/test/suite/fixtures/recorded/languages/csharp/elseStateWrapThis.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ command:
44
actionName: wrapWithSnippet
55
partialTargets:
66
- type: primitive
7-
mark: {type: cursor}
8-
extraArgs: [cursorless.wrappers.ifElseStatementElseBranch]
7+
mark: { type: cursor }
8+
extraArgs: [ifElseStatement/alternative]
99
marks: {}
1010
initialState:
1111
documentContents: int foo = 0;
1212
selections:
13-
- anchor: {line: 0, character: 6}
14-
active: {line: 0, character: 6}
13+
- anchor: { line: 0, character: 6 }
14+
active: { line: 0, character: 6 }
1515
finalState:
1616
documentContents: |-
1717
if () {
@@ -20,9 +20,20 @@ finalState:
2020
int foo = 0;
2121
}
2222
selections:
23-
- anchor: {line: 0, character: 4}
24-
active: {line: 0, character: 4}
23+
- anchor: { line: 0, character: 4 }
24+
active: { line: 0, character: 4 }
2525
thatMark:
26-
- anchor: {line: 0, character: 0}
27-
active: {line: 4, character: 1}
28-
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
26+
- anchor: { line: 0, character: 0 }
27+
active: { line: 4, character: 1 }
28+
fullTargets:
29+
[
30+
{
31+
type: primitive,
32+
mark: { type: cursor },
33+
selectionType: token,
34+
position: contents,
35+
insideOutsideType: inside,
36+
modifier:
37+
{ type: containingScope, scopeType: statement, includeSiblings: false },
38+
},
39+
]

src/test/suite/fixtures/recorded/languages/csharp/ifElseWrapThis.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ command:
44
actionName: wrapWithSnippet
55
partialTargets:
66
- type: primitive
7-
mark: {type: cursor}
8-
extraArgs: [cursorless.wrappers.ifElseStatementIfBranch]
7+
mark: { type: cursor }
8+
extraArgs: [ifElseStatement/consequence]
99
marks: {}
1010
initialState:
1111
documentContents: int foo = 0;
1212
selections:
13-
- anchor: {line: 0, character: 6}
14-
active: {line: 0, character: 6}
13+
- anchor: { line: 0, character: 6 }
14+
active: { line: 0, character: 6 }
1515
finalState:
1616
documentContents: |-
1717
if () {
@@ -20,9 +20,20 @@ finalState:
2020
2121
}
2222
selections:
23-
- anchor: {line: 0, character: 4}
24-
active: {line: 0, character: 4}
23+
- anchor: { line: 0, character: 4 }
24+
active: { line: 0, character: 4 }
2525
thatMark:
26-
- anchor: {line: 0, character: 0}
27-
active: {line: 4, character: 1}
28-
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
26+
- anchor: { line: 0, character: 0 }
27+
active: { line: 4, character: 1 }
28+
fullTargets:
29+
[
30+
{
31+
type: primitive,
32+
mark: { type: cursor },
33+
selectionType: token,
34+
position: contents,
35+
insideOutsideType: inside,
36+
modifier:
37+
{ type: containingScope, scopeType: statement, includeSiblings: false },
38+
},
39+
]

src/test/suite/fixtures/recorded/languages/csharp/ifStateWrapThis.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,34 @@ command:
44
actionName: wrapWithSnippet
55
partialTargets:
66
- type: primitive
7-
mark: {type: cursor}
8-
extraArgs: [cursorless.wrappers.ifStatement]
7+
mark: { type: cursor }
8+
extraArgs: [ifStatement/consequence]
99
marks: {}
1010
initialState:
1111
documentContents: int foo = 0;
1212
selections:
13-
- anchor: {line: 0, character: 6}
14-
active: {line: 0, character: 6}
13+
- anchor: { line: 0, character: 6 }
14+
active: { line: 0, character: 6 }
1515
finalState:
1616
documentContents: |-
1717
if () {
1818
int foo = 0;
1919
}
2020
selections:
21-
- anchor: {line: 0, character: 4}
22-
active: {line: 0, character: 4}
21+
- anchor: { line: 0, character: 4 }
22+
active: { line: 0, character: 4 }
2323
thatMark:
24-
- anchor: {line: 0, character: 0}
25-
active: {line: 2, character: 1}
26-
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
24+
- anchor: { line: 0, character: 0 }
25+
active: { line: 2, character: 1 }
26+
fullTargets:
27+
[
28+
{
29+
type: primitive,
30+
mark: { type: cursor },
31+
selectionType: token,
32+
position: contents,
33+
insideOutsideType: inside,
34+
modifier:
35+
{ type: containingScope, scopeType: statement, includeSiblings: false },
36+
},
37+
]

0 commit comments

Comments
 (0)