From ae7f4d5acfe2ab97bd51523aed24b6f6aa74523e Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 20 Sep 2021 01:22:18 +0200 Subject: Refactoring --- pkg/field/utils_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pkg/field/utils_test.go') diff --git a/pkg/field/utils_test.go b/pkg/field/utils_test.go index 52916e3..59a7cee 100644 --- a/pkg/field/utils_test.go +++ b/pkg/field/utils_test.go @@ -32,7 +32,7 @@ func TestGet(t *testing.T) { file, err := os.Open(tc.input) require.NoError(t, err, "Failed to open file") defer file.Close() - field, err := LoadFile(file) + field, err := Load(file) valid := field.Get(tc.inputX, tc.inputY) require.NoError(t, err) require.Equal(t, tc.expected, valid, "Invalid value") @@ -65,7 +65,7 @@ func TestIsIn(t *testing.T) { file, err := os.Open(tc.input) require.NoError(t, err, "Failed to open file") defer file.Close() - field, err := LoadFile(file) + field, err := Load(file) valid := field.isIn(tc.inputX, tc.inputY) require.NoError(t, err) require.Equal(t, tc.expected, valid, "Invalid value") @@ -141,7 +141,7 @@ func TestSetMinimalAppendOne(t *testing.T) { file, err := os.Open(tc.input) require.NoError(t, err, "Failed to open file") defer file.Close() - field, err := LoadFile(file) + field, err := Load(file) field.Set(tc.inputX, tc.inputY, tc.inputV) require.NoError(t, err) require.Equal(t, tc.expected, field, "Invalid value") @@ -217,7 +217,7 @@ func TestSetMinimalAppendTwo(t *testing.T) { file, err := os.Open(tc.input) require.NoError(t, err, "Failed to open file") defer file.Close() - field, err := LoadFile(file) + field, err := Load(file) field.Set(tc.inputX, tc.inputY, tc.inputV) require.NoError(t, err) require.Equal(t, tc.expected, field, "Invalid value") @@ -287,7 +287,7 @@ func TestSetMinimalAppendThree(t *testing.T) { file, err := os.Open(tc.input) require.NoError(t, err, "Failed to open file") defer file.Close() - field, err := LoadFile(file) + field, err := Load(file) field.Set(tc.inputX, tc.inputY, tc.inputV) require.NoError(t, err) require.Equal(t, tc.expected, field, "Invalid value") @@ -316,7 +316,7 @@ func TestGetAndSetOnEmptyLines(t *testing.T) { file, err := os.Open("test_data/minimal.b98") require.NoError(t, err, "Failed to open file") defer file.Close() - field, err := LoadFile(file) + field, err := Load(file) field.Set(0, 3, '#') v := field.Get(0, 3) require.Equal(t, v, int('#')) -- cgit v1.2.3