diff options
author | Julien Dessaux | 2021-09-20 01:22:18 +0200 |
---|---|---|
committer | Julien Dessaux | 2021-09-20 01:22:18 +0200 |
commit | ae7f4d5acfe2ab97bd51523aed24b6f6aa74523e (patch) | |
tree | 7f8cded5121abcf0ea61ce2ffbae9019f730b041 /pkg/field/utils_test.go | |
parent | Implemented function to set a field value (diff) | |
download | gofunge98-ae7f4d5acfe2ab97bd51523aed24b6f6aa74523e.tar.gz gofunge98-ae7f4d5acfe2ab97bd51523aed24b6f6aa74523e.tar.bz2 gofunge98-ae7f4d5acfe2ab97bd51523aed24b6f6aa74523e.zip |
Refactoring
Diffstat (limited to '')
-rw-r--r-- | pkg/field/utils_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
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('#')) |