Skip to content

Commit c7d62dc

Browse files
committed
fix tests
1 parent a751436 commit c7d62dc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pour/vinocart_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ func TestGetApproachPoint(t *testing.T) {
2323
c := r3.Vector{233.8, 202.05, 85.0}
2424

2525
p := getApproachPoint(md, c, 100, &spatialmath.OrientationVectorDegrees{OX: 1}, logger)
26-
test.That(t, p.X, test.ShouldAlmostEqual, 100, 1)
26+
test.That(t, p.X, test.ShouldAlmostEqual, c.X-100, 1)
2727
test.That(t, p.Y, test.ShouldAlmostEqual, c.Y, 1)
2828
test.That(t, p.Z, test.ShouldAlmostEqual, c.Z, 1)
2929

3030
p = getApproachPoint(md, c, 100, &spatialmath.OrientationVectorDegrees{OX: -1}, logger)
31-
test.That(t, p.X, test.ShouldAlmostEqual, 367.7, 1)
31+
test.That(t, p.X, test.ShouldAlmostEqual, c.X+100, 1)
3232
test.That(t, p.Y, test.ShouldAlmostEqual, c.Y, 1)
3333
test.That(t, p.Z, test.ShouldAlmostEqual, c.Z, 1)
3434

3535
p = getApproachPoint(md, c, 100, &spatialmath.OrientationVectorDegrees{OY: 1}, logger)
3636
test.That(t, p.X, test.ShouldAlmostEqual, c.X, 1)
37-
test.That(t, p.Y, test.ShouldAlmostEqual, md.MinY-100, 1)
37+
test.That(t, p.Y, test.ShouldAlmostEqual, c.Y-100, 1)
3838
test.That(t, p.Z, test.ShouldAlmostEqual, c.Z, 1)
3939

4040
p = getApproachPoint(md, c, 100, &spatialmath.OrientationVectorDegrees{OY: -1}, logger)
4141
test.That(t, p.X, test.ShouldAlmostEqual, c.X, 1)
42-
test.That(t, p.Y, test.ShouldAlmostEqual, md.MaxY+100, 1)
42+
test.That(t, p.Y, test.ShouldAlmostEqual, c.Y+100, 1)
4343
test.That(t, p.Z, test.ShouldAlmostEqual, c.Z, 1)
4444

4545
}

0 commit comments

Comments
 (0)