aboutsummaryrefslogtreecommitdiff
path: root/pkg/pointer/pointer_test.go
diff options
context:
space:
mode:
authorJulien Dessaux2021-09-21 15:41:52 +0200
committerJulien Dessaux2021-09-21 15:41:52 +0200
commit270a3845cdec1baf1bb548e2042d9bbfeeecf153 (patch)
tree8e38500d9618cf4fc3f22d3f61c445b9e2566d62 /pkg/pointer/pointer_test.go
parentBegan implementing the stack and the stack stack (diff)
downloadgofunge98-270a3845cdec1baf1bb548e2042d9bbfeeecf153.tar.gz
gofunge98-270a3845cdec1baf1bb548e2042d9bbfeeecf153.tar.bz2
gofunge98-270a3845cdec1baf1bb548e2042d9bbfeeecf153.zip
Simplified instruction pointer delta handling
Diffstat (limited to '')
-rw-r--r--pkg/pointer/pointer_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/pointer/pointer_test.go b/pkg/pointer/pointer_test.go
index b6a3898..4d3b6bf 100644
--- a/pkg/pointer/pointer_test.go
+++ b/pkg/pointer/pointer_test.go
@@ -9,7 +9,7 @@ import (
)
func TestNewPointer(t *testing.T) {
- require.Equal(t, NewPointer(), &Pointer{delta: &Delta{1, 0}})
+ require.Equal(t, NewPointer(), &Pointer{dx: 1})
}
func TestSplit(t *testing.T) {
@@ -23,8 +23,8 @@ func TestSplit(t *testing.T) {
// We check that p2 is a real copy
p.Step(*f)
p2.Step(*f)
- require.Equal(t, p, &Pointer{x: 1, y: 0, delta: &Delta{1, 0}})
- require.Equal(t, p2, &Pointer{x: 1, y: 0, delta: &Delta{1, 0}})
+ require.Equal(t, p, &Pointer{x: 1, y: 0, dx: 1})
+ require.Equal(t, p2, &Pointer{x: 1, y: 0, dx: 1})
}
func TestStep(t *testing.T) { // Step is thoroughly tested in the field package