fixed typos and types in all tests

This commit is contained in:
Derek McQuay 2016-08-27 19:08:51 -07:00
parent ff52a9115c
commit ace4f45155
3 changed files with 10 additions and 10 deletions

View File

@ -19,7 +19,7 @@ func TestDistance(t *testing.T) {
actual := distance(rt.p[0], rt.p[1])
if actual != rt.expected {
t.Errorf(
"failed spiral:\n\texpected: %d\n\t actual: %d",
"failed distance:\n\texpected: %f\n\t actual: %f",
rt.expected,
actual,
)
@ -42,7 +42,7 @@ func TestOnLine(t *testing.T) {
actual := onLine(rt.p[0], rt.p[1], rt.p[2])
if actual != rt.expected {
t.Errorf(
"failed spiral:\n\texpected: %d\n\t actual: %d",
"failed onLine:\n\texpected: %t\n\t actual: %t",
rt.expected,
actual,
)
@ -65,7 +65,7 @@ func TestLineIntersection(t *testing.T) {
actual, _ := lineIntersection(rt.l[0], rt.l[1])
if actual != rt.expected {
t.Errorf(
"failed spiral:\n\texpected: %f\n\t actual: %f",
"failed lineIntersection:\n\texpected: %v\n\t actual: %v",
rt.expected,
actual,
)

View File

@ -19,7 +19,7 @@ func TestIsRect(t *testing.T) {
actual := rt.r.IsRect()
if actual != rt.expected {
t.Errorf(
"failed spiral:\n\texpected: %d\n\t actual: %d",
"failed isRect:\n\texpected: %t\n\t actual: %t",
rt.expected,
actual,
)
@ -44,7 +44,7 @@ func TestSize(t *testing.T) {
actual := rt.r.Size()
if actual != rt.expected {
t.Errorf(
"failed spiral:\n\texpected: %d\n\t actual: %d",
"failed size:\n\texpected: %f\n\t actual: %f",
rt.expected,
actual,
)
@ -87,7 +87,7 @@ func TestContainment(t *testing.T) {
actual := Containment(rt.r[0], rt.r[1])
if actual != rt.expected {
t.Errorf(
"failed spiral:\n\texpected: %d\n\t actual: %d",
"failed Containment:\n\texpected: %t\n\t actual: %t",
rt.expected,
actual,
)
@ -136,7 +136,7 @@ func TestAdjacency(t *testing.T) {
actual := Adjacency(rt.r[0], rt.r[1])
if actual != rt.expected {
t.Errorf(
"failed spiral:\n\texpected: %d\n\t actual: %d",
"failed adjacency:\n\texpected: %t\n\t actual: %t",
rt.expected,
actual,
)
@ -173,7 +173,7 @@ func TestIntersection(t *testing.T) {
actual := Intersection(rt.r[0], rt.r[1])
if len(actual) != len(rt.expected) {
t.Errorf(
"failed spiral:\n\texpected: %d\n\t actual: %d",
"failed intersection:\n\texpected: %d\n\t actual: %d",
len(rt.expected),
len(actual),
)
@ -182,7 +182,7 @@ func TestIntersection(t *testing.T) {
for i, _ := range actual {
if actual[i] != rt.expected[i] {
t.Errorf(
"failed spiral:\n\texpected: %d\n\t actual: %d",
"failed intersection:\n\texpected: %v\n\t actual: %v",
rt.expected[i],
actual[i],
)

View File

@ -15,7 +15,7 @@ func TestSizeTriangle(t *testing.T) {
actual := SizeTriangle(rt.pts[0], rt.pts[1], rt.pts[2])
if actual != rt.expected {
t.Errorf(
"failed spiral:\n\texpected: %d\n\t actual: %d",
"failed sizeTriangle:\n\texpected: %f\n\t actual: %f",
rt.expected,
actual,
)