Skip to content

Commit

Permalink
Fixed error output in tests.
Browse files Browse the repository at this point in the history
- We're experiencing errors in Travis-CI that aren't occuring locally.
  • Loading branch information
dsoprea committed Jan 12, 2018
1 parent de3b4fb commit 1705a9b
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func TestParseString(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "some string", "some string" },
}

Expand All @@ -23,7 +23,7 @@ func TestParseString(t *testing.T) {
}

func TestParseInt8(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "-67", int8(-67) },
}

Expand All @@ -38,7 +38,7 @@ func TestParseInt8(t *testing.T) {
}

func TestParseInt16(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "-7013", int16(-7013) },
}

Expand All @@ -53,7 +53,7 @@ func TestParseInt16(t *testing.T) {
}

func TestParseInt32(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "-33908743", int32(-33908743) },
}

Expand All @@ -68,7 +68,7 @@ func TestParseInt32(t *testing.T) {
}

func TestParseInt64(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "-0945895663560175", int64(-945895663560175) },
}

Expand All @@ -83,7 +83,7 @@ func TestParseInt64(t *testing.T) {
}

func TestParseUint8(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "75", uint8(75) },
}

Expand All @@ -98,7 +98,7 @@ func TestParseUint8(t *testing.T) {
}

func TestParseUint16(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "15798", uint16(15798) },
}

Expand All @@ -113,7 +113,7 @@ func TestParseUint16(t *testing.T) {
}

func TestParseUint32(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "07876050", uint32(7876050) },
}

Expand All @@ -128,7 +128,7 @@ func TestParseUint32(t *testing.T) {
}

func TestParseUint64(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "4101229679899789", uint64(4101229679899789) },
}

Expand All @@ -143,7 +143,7 @@ func TestParseUint64(t *testing.T) {
}

func TestParseHex8(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "C4", uint8(0xC4) },
}

Expand All @@ -158,7 +158,7 @@ func TestParseHex8(t *testing.T) {
}

func TestParseHex16(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "9F06", uint16(0x9F06) },
}

Expand All @@ -173,7 +173,7 @@ func TestParseHex16(t *testing.T) {
}

func TestParseHex32(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "9E311959", uint32(0x9E311959) },
}

Expand All @@ -188,7 +188,7 @@ func TestParseHex32(t *testing.T) {
}

func TestParseHex64(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "427F2A1E7A23DC3E", uint64(0x427F2A1E7A23DC3E) },
}

Expand All @@ -203,7 +203,7 @@ func TestParseHex64(t *testing.T) {
}

func TestParseFloat32(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "-0.6046603", float32(-0.6046603) },
{ "0.6046603", float32(0.6046603) },
}
Expand All @@ -213,13 +213,13 @@ func TestParseFloat32(t *testing.T) {
parsed2 := p.Float32(pair[0])

if parsed2 != pair[1] {
t.Errorf("parse did not produce correct result: [%d] != [%d]", parsed2, pair[1])
t.Errorf("parse did not produce correct result: [%f] != [%f]", parsed2, pair[1])
}
}
}

func TestParseFloat64(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "-0.9405090880450124", float64(-0.9405090880450124) },
{ "0.9405090880450124", float64(0.9405090880450124) },
}
Expand All @@ -229,13 +229,13 @@ func TestParseFloat64(t *testing.T) {
parsed2 := p.Float64(pair[0])

if parsed2 != pair[1] {
t.Errorf("parse did not produce correct result: [%d] != [%d]", parsed2, pair[1])
t.Errorf("parse did not produce correct result: [%f] != [%f]", parsed2, pair[1])
}
}
}

func TestParseBool(t *testing.T) {
phrases := [][]interface{} {
phrases := [][]interface{} {
{ "0", false },
{ "1", true },
}
Expand All @@ -245,13 +245,13 @@ func TestParseBool(t *testing.T) {
parsed2 := p.Bool(pair[0])

if parsed2 != pair[1] {
t.Errorf("parse did not produce correct result: [%d] != [%d]", parsed2, pair[1])
t.Errorf("parse did not produce correct result: [%v] != [%v]", parsed2, pair[1])
}
}
}

func TestParseRfc3339(t *testing.T) {
phrases := []string {
phrases := []string {
"2016-11-08T19:32:29Z",
"2016-11-08T19:32:29+12:34",
}
Expand Down

0 comments on commit 1705a9b

Please sign in to comment.