diff --git a/.travis.yml b/.travis.yml index 35d276c..ae0adb7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,6 @@ language: go go: - 1.6.3 - - 1.7.3 + - 1.7.4 - 1.8beta1 - master diff --git a/hostfile_test.go b/hostfile_test.go index 8bbcb00..e144334 100644 --- a/hostfile_test.go +++ b/hostfile_test.go @@ -141,7 +141,7 @@ func TestParseLineMultiHostnameComment(t *testing.T) { !hosts.Contains(hostess.MustHostname("domain.com", "66.33.99.11", false)) || len(hosts) != 2 { t.Error("Expected to find domain.com and test.domain.com (disabled)") - t.Errorf("Found %s", hosts) + t.Errorf("Found %+v", hosts) } } diff --git a/hostlist_test.go b/hostlist_test.go index 1e1a5cf..ff08a0c 100644 --- a/hostlist_test.go +++ b/hostlist_test.go @@ -82,12 +82,12 @@ func TestContainsDomainIp(t *testing.T) { expectedHostname := hostess.MustHostname(domain, ip, true) if !hosts.Contains(expectedHostname) { - t.Errorf("Expected to find %s", expectedHostname) + t.Errorf("Expected to find %+v", expectedHostname) } extraneousHostname := hostess.MustHostname("yahoo.com", "4.3.2.1", false) if hosts.Contains(extraneousHostname) { - t.Errorf("Did not expect to find %s", extraneousHostname) + t.Errorf("Did not expect to find %+v", extraneousHostname) } } diff --git a/hostname_test.go b/hostname_test.go index 488dd5c..f64dffa 100644 --- a/hostname_test.go +++ b/hostname_test.go @@ -27,10 +27,10 @@ func TestEqual(t *testing.T) { c := hostess.MustHostname("localhost", "127.0.1.1", false) if !a.Equal(b) { - t.Errorf("%s and %s should be equal", a, b) + t.Errorf("%+v and %+v should be equal", a, b) } if a.Equal(c) { - t.Errorf("%s and %s should not be equal", a, c) + t.Errorf("%+v and %+v should not be equal", a, c) } } @@ -55,7 +55,7 @@ func TestIsValid(t *testing.T) { IPv6: true, } if !hostname.IsValid() { - t.Fatalf("%s should be a valid hostname", hostname) + t.Fatalf("%+v should be a valid hostname", hostname) } } @@ -67,7 +67,7 @@ func TestIsValidBlank(t *testing.T) { IPv6: true, } if hostname.IsValid() { - t.Errorf("%s should be invalid because the name is blank", hostname) + t.Errorf("%+v should be invalid because the name is blank", hostname) } } func TestIsValidBadIP(t *testing.T) { @@ -78,7 +78,7 @@ func TestIsValidBadIP(t *testing.T) { IPv6: true, } if hostname.IsValid() { - t.Errorf("%s should be invalid because the ip is malformed", hostname) + t.Errorf("%+v should be invalid because the ip is malformed", hostname) } }