You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2015/09/11 23:13:59 UTC

[3/7] lucy-clownfish git commit: Improve quoting in test messages.

Improve quoting in test messages.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/180d963b
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/180d963b
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/180d963b

Branch: refs/heads/master
Commit: 180d963b64cba359cb55b44dbe49613e4dc2a76d
Parents: 7988b5f
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Fri Aug 28 18:11:13 2015 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Tue Sep 8 19:09:24 2015 -0700

----------------------------------------------------------------------
 runtime/go/clownfish/err_test.go  |  6 +++---
 runtime/go/clownfish/hash_test.go | 14 +++++++-------
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/180d963b/runtime/go/clownfish/err_test.go
----------------------------------------------------------------------
diff --git a/runtime/go/clownfish/err_test.go b/runtime/go/clownfish/err_test.go
index a7abff5..b439ab7 100644
--- a/runtime/go/clownfish/err_test.go
+++ b/runtime/go/clownfish/err_test.go
@@ -44,7 +44,7 @@ func TestErrGetMess(t *testing.T) {
 	err := NewErr("foo")
 	expected := "foo"
 	if got := err.GetMess(); got != expected {
-		t.Errorf("Expected %v, got %v", expected, got)
+		t.Errorf("Expected '%v', got '%v'", expected, got)
 	}
 }
 
@@ -53,7 +53,7 @@ func TestErrCatMess(t *testing.T) {
 	err.CatMess("bar")
 	expected := "foobar"
 	if got := err.GetMess(); got != expected {
-		t.Errorf("Expected %v, got %v", expected, got)
+		t.Errorf("Expected '%v', got '%v'", expected, got)
 	}
 }
 
@@ -61,6 +61,6 @@ func TestErrToString(t *testing.T) {
 	err := NewErr("foo")
 	expected := "foo"
 	if got := err.ToString(); got != expected {
-		t.Errorf("Expected %v, got %v", expected, got)
+		t.Errorf("Expected '%v', got '%v'", expected, got)
 	}
 }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/180d963b/runtime/go/clownfish/hash_test.go
----------------------------------------------------------------------
diff --git a/runtime/go/clownfish/hash_test.go b/runtime/go/clownfish/hash_test.go
index c2970e0..26acf49 100644
--- a/runtime/go/clownfish/hash_test.go
+++ b/runtime/go/clownfish/hash_test.go
@@ -24,11 +24,11 @@ func TestHashStoreFetch(t *testing.T) {
 	hash := NewHash(0)
 	hash.Store("foo", "bar")
 	if got, ok := hash.Fetch("foo").(string); !ok || got != "bar" {
-		t.Errorf("Expected \"bar\", got %v", got)
+		t.Errorf("Expected 'bar', got '%v'", got)
 	}
 	hash.Store("nada", nil)
 	if got := hash.Fetch("nada"); got != nil {
-		t.Errorf("Expected nil, got %v", got)
+		t.Errorf("Expected nil, got '%v'", got)
 	}
 }
 
@@ -40,7 +40,7 @@ func TestHashDelete(t *testing.T) {
 		t.Errorf("Delete failed (size %d)", size)
 	}
 	if val, ok := got.(string); !ok || val != "bar" {
-		t.Errorf("Delete returned unexpected value: %v")
+		t.Errorf("Delete returned unexpected value: '%v'", val)
 	}
 }
 
@@ -76,7 +76,7 @@ func TestHashKeys(t *testing.T) {
 	sort.Strings(keys)
 	expected := []string{"a", "b"}
 	if !reflect.DeepEqual(keys, expected) {
-		t.Errorf("Expected %v, got %v", expected, keys)
+		t.Errorf("Expected '%v', got '%v'", expected, keys)
 	}
 }
 
@@ -92,7 +92,7 @@ func TestHashValues(t *testing.T) {
 	sort.Strings(vals)
 	expected := []string{"a", "b"}
 	if !reflect.DeepEqual(vals, expected) {
-		t.Errorf("Expected %v, got %v", expected, vals)
+		t.Errorf("Expected '%v', got '%v'", expected, vals)
 	}
 }
 
@@ -146,10 +146,10 @@ func TestHashIterator(t *testing.T) {
 		t.Error("Next() should proceed")
 	}
 	if key := iter.GetKey(); key != "a" {
-		t.Error("Expected \"a\", got %v", key)
+		t.Error("Expected 'a', got '%v'", key)
 	}
 	if val, ok := iter.GetValue().(string); !ok || val != "foo" {
-		t.Error("Expected \"a\", got %v", val)
+		t.Error("Expected 'a', got '%v'", val)
 	}
 	if iter.Next() {
 		t.Error("Next() should return false when iteration complete")