rename input to t

This commit is contained in:
Jesse Duffield 2022-12-27 21:35:36 +11:00
parent 53e06b71ae
commit 78b495f50a
45 changed files with 376 additions and 399 deletions

View file

@ -63,10 +63,10 @@ func (self *fakeGuiDriver) View(viewName string) *gocui.View {
func TestAssertionFailure(t *testing.T) {
test := NewIntegrationTest(NewIntegrationTestArgs{
Description: unitTestDescription,
Run: func(shell *Shell, input *Input, keys config.KeybindingConfig) {
input.press("a")
input.press("b")
input.Model().CommitCount(2)
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
t.press("a")
t.press("b")
t.Model().CommitCount(2)
},
})
driver := &fakeGuiDriver{}
@ -78,8 +78,8 @@ func TestAssertionFailure(t *testing.T) {
func TestManualFailure(t *testing.T) {
test := NewIntegrationTest(NewIntegrationTestArgs{
Description: unitTestDescription,
Run: func(shell *Shell, input *Input, keys config.KeybindingConfig) {
input.Fail("blah")
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
t.Fail("blah")
},
})
driver := &fakeGuiDriver{}
@ -90,10 +90,10 @@ func TestManualFailure(t *testing.T) {
func TestSuccess(t *testing.T) {
test := NewIntegrationTest(NewIntegrationTestArgs{
Description: unitTestDescription,
Run: func(shell *Shell, input *Input, keys config.KeybindingConfig) {
input.press("a")
input.press("b")
input.Model().CommitCount(0)
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
t.press("a")
t.press("b")
t.Model().CommitCount(0)
},
})
driver := &fakeGuiDriver{}