Skip to content

Commit

Permalink
Fix some format specifier errors.
Browse files Browse the repository at this point in the history
`go test` now breaks on these.
  • Loading branch information
dsymonds committed Mar 12, 2018
1 parent 260322a commit fb250ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions s2/loop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1616,10 +1616,10 @@ func TestLoopNormalizedCompatibleWithContains(t *testing.T) {

flip.Invert()
if norm, contains := loop.IsNormalized(), loop.ContainsPoint(p); norm == contains {
t.Errorf("loop.IsNormalized() = %b == loop.ContainsPoint(%v) = %v, want !=", norm, p, contains)
t.Errorf("loop.IsNormalized() = %t == loop.ContainsPoint(%v) = %v, want !=", norm, p, contains)
}
if norm, contains := flip.IsNormalized(), flip.ContainsPoint(p); norm == contains {
t.Errorf("flip.IsNormalized() = %b == flip.ContainsPoint(%v) = %v, want !=", norm, p, contains)
t.Errorf("flip.IsNormalized() = %t == flip.ContainsPoint(%v) = %v, want !=", norm, p, contains)
}
if a, b := loop.IsNormalized(), flip.IsNormalized(); a == b {
t.Errorf("a loop and it's invert can not both be normalized")
Expand Down
4 changes: 2 additions & 2 deletions s2/stuv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func TestFaceUVToXYZ(t *testing.T) {

// Check that each face has a right-handed coordinate system.
if got := uAxis(face).Vector.Cross(vAxis(face).Vector).Dot(unitNorm(face).Vector); got != 1 {
t.Errorf("right-handed check failed. uAxis(%d).Cross(vAxis(%d)).Dot(unitNorm%v) = %d, want 1", face, face, face, got)
t.Errorf("right-handed check failed. uAxis(%d).Cross(vAxis(%d)).Dot(unitNorm%v) = %f, want 1", face, face, face, got)
}

// Check that the Hilbert curves on each face combine to form a
Expand Down Expand Up @@ -183,7 +183,7 @@ func TestUVWAxis(t *testing.T) {

// Check that every face coordinate frame is right-handed.
if got := uAxis(face).Vector.Cross(vAxis(face).Vector).Dot(unitNorm(face).Vector); got != 1 {
t.Errorf("right-handed check failed. got %d, want 1", got)
t.Errorf("right-handed check failed. got %f, want 1", got)
}

// Check that GetUVWAxis is consistent with GetUAxis, GetVAxis, GetNorm.
Expand Down

0 comments on commit fb250ae

Please sign in to comment.