Skip to content

Commit

Permalink
test function naming more go-like
Browse files Browse the repository at this point in the history
  • Loading branch information
mscoutermarsh committed May 1, 2023
1 parent c15b91f commit 1522455
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions internal/dumper/dumper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
qt "github.com/frankban/quicktest"
)

func createFieldRow(name, extra string) []sqltypes.Value {
func testRow(name, extra string) []sqltypes.Value {
return []sqltypes.Value{
sqltypes.MakeTrusted(querypb.Type_VARCHAR, []byte(name)),
sqltypes.MakeTrusted(querypb.Type_BLOB, []byte("varchar(255)")),
Expand Down Expand Up @@ -125,13 +125,13 @@ func TestDumper(t *testing.T) {
{Name: "Extra", Type: querypb.Type_VARCHAR},
},
Rows: [][]sqltypes.Value{
createFieldRow("id", ""),
createFieldRow("name", ""),
createFieldRow("namei1", ""),
createFieldRow("null", ""),
createFieldRow("decimal", ""),
createFieldRow("datetime", ""),
createFieldRow("not_deleted", "virtual generated"),
testRow("id", ""),
testRow("name", ""),
testRow("namei1", ""),
testRow("null", ""),
testRow("decimal", ""),
testRow("datetime", ""),
testRow("not_deleted", "virtual generated"),
},
}

Expand Down Expand Up @@ -271,13 +271,13 @@ func TestDumperGeneratedFields(t *testing.T) {
{Name: "Extra", Type: querypb.Type_VARCHAR},
},
Rows: [][]sqltypes.Value{
createFieldRow("id", ""),
createFieldRow("name", "VIRTUAL GENERATED"),
createFieldRow("namei1", ""),
createFieldRow("null", ""),
createFieldRow("decimal", ""),
createFieldRow("datetime", ""),
createFieldRow("not_deleted", "VIRTUAL GENERATED"),
testRow("id", ""),
testRow("name", "VIRTUAL GENERATED"),
testRow("namei1", ""),
testRow("null", ""),
testRow("decimal", ""),
testRow("datetime", ""),
testRow("not_deleted", "VIRTUAL GENERATED"),
},
}

Expand Down Expand Up @@ -451,13 +451,13 @@ func TestDumperAll(t *testing.T) {
{Name: "Extra", Type: querypb.Type_VARCHAR},
},
Rows: [][]sqltypes.Value{
createFieldRow("id", ""),
createFieldRow("name", ""),
createFieldRow("namei1", ""),
createFieldRow("null", ""),
createFieldRow("decimal", ""),
createFieldRow("datetime", ""),
createFieldRow("not_deleted", "virtual generated"),
testRow("id", ""),
testRow("name", ""),
testRow("namei1", ""),
testRow("null", ""),
testRow("decimal", ""),
testRow("datetime", ""),
testRow("not_deleted", "virtual generated"),
},
}

Expand Down Expand Up @@ -638,13 +638,13 @@ func TestDumperMultiple(t *testing.T) {
{Name: "Extra", Type: querypb.Type_VARCHAR},
},
Rows: [][]sqltypes.Value{
createFieldRow("id", ""),
createFieldRow("name", ""),
createFieldRow("namei1", ""),
createFieldRow("null", ""),
createFieldRow("decimal", ""),
createFieldRow("datetime", ""),
createFieldRow("not_deleted", "virtual generated"),
testRow("id", ""),
testRow("name", ""),
testRow("namei1", ""),
testRow("null", ""),
testRow("decimal", ""),
testRow("datetime", ""),
testRow("not_deleted", "virtual generated"),
},
}

Expand Down Expand Up @@ -835,13 +835,13 @@ func TestDumperSimpleRegexp(t *testing.T) {
{Name: "Extra", Type: querypb.Type_VARCHAR},
},
Rows: [][]sqltypes.Value{
createFieldRow("id", ""),
createFieldRow("name", ""),
createFieldRow("namei1", ""),
createFieldRow("null", ""),
createFieldRow("decimal", ""),
createFieldRow("datetime", ""),
createFieldRow("not_deleted", "virtual generated"),
testRow("id", ""),
testRow("name", ""),
testRow("namei1", ""),
testRow("null", ""),
testRow("decimal", ""),
testRow("datetime", ""),
testRow("not_deleted", "virtual generated"),
},
}

Expand Down Expand Up @@ -1032,13 +1032,13 @@ func TestDumperComplexRegexp(t *testing.T) {
{Name: "Extra", Type: querypb.Type_VARCHAR},
},
Rows: [][]sqltypes.Value{
createFieldRow("id", ""),
createFieldRow("name", ""),
createFieldRow("namei1", ""),
createFieldRow("null", ""),
createFieldRow("decimal", ""),
createFieldRow("datetime", ""),
createFieldRow("not_deleted", "virtual generated"),
testRow("id", ""),
testRow("name", ""),
testRow("namei1", ""),
testRow("null", ""),
testRow("decimal", ""),
testRow("datetime", ""),
testRow("not_deleted", "virtual generated"),
},
}

Expand Down

0 comments on commit 1522455

Please sign in to comment.