Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey committed Oct 21, 2021
1 parent a52473f commit 2a84b42
Show file tree
Hide file tree
Showing 25 changed files with 533 additions and 258 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ command:
actionName: wrapWithSnippet
partialTargets:
- type: primitive
mark: {type: cursor}
extraArgs: [cursorless.wrappers.ifElseStatementElseBranch]
mark: { type: cursor }
extraArgs: [ifElseStatement/alternative]
marks: {}
initialState:
documentContents: int foo = 0;
selections:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
- anchor: { line: 0, character: 6 }
active: { line: 0, character: 6 }
finalState:
documentContents: |-
if () {
Expand All @@ -20,9 +20,20 @@ finalState:
int foo = 0;
}
selections:
- anchor: {line: 0, character: 4}
active: {line: 0, character: 4}
- anchor: { line: 0, character: 4 }
active: { line: 0, character: 4 }
thatMark:
- anchor: {line: 0, character: 0}
active: {line: 4, character: 1}
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
- anchor: { line: 0, character: 0 }
active: { line: 4, character: 1 }
fullTargets:
[
{
type: primitive,
mark: { type: cursor },
selectionType: token,
position: contents,
insideOutsideType: inside,
modifier:
{ type: containingScope, scopeType: statement, includeSiblings: false },
},
]
29 changes: 20 additions & 9 deletions src/test/suite/fixtures/recorded/languages/cpp/ifElseWrapThis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ command:
actionName: wrapWithSnippet
partialTargets:
- type: primitive
mark: {type: cursor}
extraArgs: [cursorless.wrappers.ifElseStatementIfBranch]
mark: { type: cursor }
extraArgs: [ifElseStatement/consequence]
marks: {}
initialState:
documentContents: int foo = 0;
selections:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
- anchor: { line: 0, character: 6 }
active: { line: 0, character: 6 }
finalState:
documentContents: |-
if () {
Expand All @@ -20,9 +20,20 @@ finalState:
}
selections:
- anchor: {line: 0, character: 4}
active: {line: 0, character: 4}
- anchor: { line: 0, character: 4 }
active: { line: 0, character: 4 }
thatMark:
- anchor: {line: 0, character: 0}
active: {line: 4, character: 1}
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
- anchor: { line: 0, character: 0 }
active: { line: 4, character: 1 }
fullTargets:
[
{
type: primitive,
mark: { type: cursor },
selectionType: token,
position: contents,
insideOutsideType: inside,
modifier:
{ type: containingScope, scopeType: statement, includeSiblings: false },
},
]
29 changes: 20 additions & 9 deletions src/test/suite/fixtures/recorded/languages/cpp/ifStateWrapThis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,34 @@ command:
actionName: wrapWithSnippet
partialTargets:
- type: primitive
mark: {type: cursor}
extraArgs: [cursorless.wrappers.ifStatement]
mark: { type: cursor }
extraArgs: [ifStatement/consequence]
marks: {}
initialState:
documentContents: int foo = 0;
selections:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
- anchor: { line: 0, character: 6 }
active: { line: 0, character: 6 }
finalState:
documentContents: |-
if () {
int foo = 0;
}
selections:
- anchor: {line: 0, character: 4}
active: {line: 0, character: 4}
- anchor: { line: 0, character: 4 }
active: { line: 0, character: 4 }
thatMark:
- anchor: {line: 0, character: 0}
active: {line: 2, character: 1}
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
- anchor: { line: 0, character: 0 }
active: { line: 2, character: 1 }
fullTargets:
[
{
type: primitive,
mark: { type: cursor },
selectionType: token,
position: contents,
insideOutsideType: inside,
modifier:
{ type: containingScope, scopeType: statement, includeSiblings: false },
},
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ command:
actionName: wrapWithSnippet
partialTargets:
- type: primitive
mark: {type: cursor}
extraArgs: [cursorless.wrappers.tryCatchStatement]
mark: { type: cursor }
extraArgs: [tryCatchStatement/body]
marks: {}
initialState:
documentContents: int foo = 0;
selections:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
- anchor: { line: 0, character: 6 }
active: { line: 0, character: 6 }
finalState:
documentContents: |-
try {
Expand All @@ -20,9 +20,20 @@ finalState:
}
selections:
- anchor: {line: 2, character: 9}
active: {line: 2, character: 9}
- anchor: { line: 2, character: 9 }
active: { line: 2, character: 9 }
thatMark:
- anchor: {line: 0, character: 0}
active: {line: 4, character: 1}
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
- anchor: { line: 0, character: 0 }
active: { line: 4, character: 1 }
fullTargets:
[
{
type: primitive,
mark: { type: cursor },
selectionType: token,
position: contents,
insideOutsideType: inside,
modifier:
{ type: containingScope, scopeType: statement, includeSiblings: false },
},
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ command:
actionName: wrapWithSnippet
partialTargets:
- type: primitive
mark: {type: cursor}
extraArgs: [cursorless.wrappers.tryCatchStatement]
mark: { type: cursor }
extraArgs: [tryCatchStatement/body]
marks: {}
initialState:
documentContents: |-
Expand All @@ -15,10 +15,10 @@ initialState:
int bar = 1;
selections:
- anchor: {line: 4, character: 0}
active: {line: 4, character: 0}
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
- anchor: { line: 4, character: 0 }
active: { line: 4, character: 0 }
- anchor: { line: 0, character: 0 }
active: { line: 0, character: 0 }
finalState:
documentContents: |-
try {
Expand All @@ -35,13 +35,24 @@ finalState:
}
selections:
- anchor: {line: 10, character: 9}
active: {line: 10, character: 9}
- anchor: {line: 4, character: 9}
active: {line: 4, character: 9}
- anchor: { line: 10, character: 9 }
active: { line: 10, character: 9 }
- anchor: { line: 4, character: 9 }
active: { line: 4, character: 9 }
thatMark:
- anchor: {line: 8, character: 0}
active: {line: 12, character: 1}
- anchor: {line: 0, character: 0}
active: {line: 6, character: 1}
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
- anchor: { line: 8, character: 0 }
active: { line: 12, character: 1 }
- anchor: { line: 0, character: 0 }
active: { line: 6, character: 1 }
fullTargets:
[
{
type: primitive,
mark: { type: cursor },
selectionType: token,
position: contents,
insideOutsideType: inside,
modifier:
{ type: containingScope, scopeType: statement, includeSiblings: false },
},
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ command:
actionName: wrapWithSnippet
partialTargets:
- type: primitive
mark: {type: cursor}
extraArgs: [cursorless.wrappers.ifElseStatementElseBranch]
mark: { type: cursor }
extraArgs: [ifElseStatement/alternative]
marks: {}
initialState:
documentContents: int foo = 0;
selections:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
- anchor: { line: 0, character: 6 }
active: { line: 0, character: 6 }
finalState:
documentContents: |-
if () {
Expand All @@ -20,9 +20,20 @@ finalState:
int foo = 0;
}
selections:
- anchor: {line: 0, character: 4}
active: {line: 0, character: 4}
- anchor: { line: 0, character: 4 }
active: { line: 0, character: 4 }
thatMark:
- anchor: {line: 0, character: 0}
active: {line: 4, character: 1}
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
- anchor: { line: 0, character: 0 }
active: { line: 4, character: 1 }
fullTargets:
[
{
type: primitive,
mark: { type: cursor },
selectionType: token,
position: contents,
insideOutsideType: inside,
modifier:
{ type: containingScope, scopeType: statement, includeSiblings: false },
},
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ command:
actionName: wrapWithSnippet
partialTargets:
- type: primitive
mark: {type: cursor}
extraArgs: [cursorless.wrappers.ifElseStatementIfBranch]
mark: { type: cursor }
extraArgs: [ifElseStatement/consequence]
marks: {}
initialState:
documentContents: int foo = 0;
selections:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
- anchor: { line: 0, character: 6 }
active: { line: 0, character: 6 }
finalState:
documentContents: |-
if () {
Expand All @@ -20,9 +20,20 @@ finalState:
}
selections:
- anchor: {line: 0, character: 4}
active: {line: 0, character: 4}
- anchor: { line: 0, character: 4 }
active: { line: 0, character: 4 }
thatMark:
- anchor: {line: 0, character: 0}
active: {line: 4, character: 1}
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
- anchor: { line: 0, character: 0 }
active: { line: 4, character: 1 }
fullTargets:
[
{
type: primitive,
mark: { type: cursor },
selectionType: token,
position: contents,
insideOutsideType: inside,
modifier:
{ type: containingScope, scopeType: statement, includeSiblings: false },
},
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,34 @@ command:
actionName: wrapWithSnippet
partialTargets:
- type: primitive
mark: {type: cursor}
extraArgs: [cursorless.wrappers.ifStatement]
mark: { type: cursor }
extraArgs: [ifStatement/consequence]
marks: {}
initialState:
documentContents: int foo = 0;
selections:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
- anchor: { line: 0, character: 6 }
active: { line: 0, character: 6 }
finalState:
documentContents: |-
if () {
int foo = 0;
}
selections:
- anchor: {line: 0, character: 4}
active: {line: 0, character: 4}
- anchor: { line: 0, character: 4 }
active: { line: 0, character: 4 }
thatMark:
- anchor: {line: 0, character: 0}
active: {line: 2, character: 1}
fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]
- anchor: { line: 0, character: 0 }
active: { line: 2, character: 1 }
fullTargets:
[
{
type: primitive,
mark: { type: cursor },
selectionType: token,
position: contents,
insideOutsideType: inside,
modifier:
{ type: containingScope, scopeType: statement, includeSiblings: false },
},
]
Loading

0 comments on commit 2a84b42

Please sign in to comment.