diff options
author | Julien Dessaux | 2021-09-22 23:42:16 +0200 |
---|---|---|
committer | Julien Dessaux | 2021-09-22 23:42:16 +0200 |
commit | 6f70a7237b77ad75a3adcf2dd30bbf75376451a5 (patch) | |
tree | f59d537b52663110da8c7c0907eaec0b9564edc6 /pkg/pointer/storage-offset_test.go | |
parent | Finished implementing the stack stack (diff) | |
download | gofunge98-6f70a7237b77ad75a3adcf2dd30bbf75376451a5.tar.gz gofunge98-6f70a7237b77ad75a3adcf2dd30bbf75376451a5.tar.bz2 gofunge98-6f70a7237b77ad75a3adcf2dd30bbf75376451a5.zip |
Fixed test order mistake between expected value and got value
Diffstat (limited to 'pkg/pointer/storage-offset_test.go')
-rw-r--r-- | pkg/pointer/storage-offset_test.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pkg/pointer/storage-offset_test.go b/pkg/pointer/storage-offset_test.go index 26a5f38..62e8a6e 100644 --- a/pkg/pointer/storage-offset_test.go +++ b/pkg/pointer/storage-offset_test.go @@ -9,27 +9,27 @@ import ( func TestGetStorageOffset(t *testing.T) { p := NewPointer() x, y := p.GetStorageOffset() - require.Equal(t, x, 0) - require.Equal(t, y, 0) + require.Equal(t, 0, x) + require.Equal(t, 0, y) p.SetStorageOffset(3, 8) x, y = p.GetStorageOffset() - require.Equal(t, x, 3) - require.Equal(t, y, 8) + require.Equal(t, 3, x) + require.Equal(t, 8, y) } func TestCalculateNewStorageOffset(t *testing.T) { p := NewPointer() p.CalculateNewStorageOffset() x, y := p.GetStorageOffset() - require.Equal(t, x, 1) - require.Equal(t, y, 0) + require.Equal(t, 1, x) + require.Equal(t, 0, y) p.sox, p.soy = 3, 2 x, y = p.GetStorageOffset() - require.Equal(t, x, 3) - require.Equal(t, y, 2) + require.Equal(t, 3, x) + require.Equal(t, 2, y) p.x, p.y = 8, 12 p.CalculateNewStorageOffset() x, y = p.GetStorageOffset() - require.Equal(t, x, 9) - require.Equal(t, y, 12) + require.Equal(t, 9, x) + require.Equal(t, 12, y) } |