Adjust Go bindings for CharBuf changes
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/8c8780a7 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/8c8780a7 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/8c8780a7 Branch: refs/heads/master Commit: 8c8780a7d485d901f70bddcfe893947f5fd400af Parents: 5477135 Author: Nick Wellnhofer <[email protected]> Authored: Thu Nov 12 16:46:07 2015 +0100 Committer: Nick Wellnhofer <[email protected]> Committed: Thu Nov 12 16:48:15 2015 +0100 ---------------------------------------------------------------------- runtime/go/clownfish/charbuf_test.go | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/8c8780a7/runtime/go/clownfish/charbuf_test.go ---------------------------------------------------------------------- diff --git a/runtime/go/clownfish/charbuf_test.go b/runtime/go/clownfish/charbuf_test.go index 27c2b03..ec89e52 100644 --- a/runtime/go/clownfish/charbuf_test.go +++ b/runtime/go/clownfish/charbuf_test.go @@ -20,17 +20,7 @@ import "testing" func TestCharBufCat(t *testing.T) { cb := NewCharBuf(0) - cb.cat("foo") - if got := cb.ToString(); got != "foo" { - t.Errorf("Expected foo, got %v", got) - } -} - -func TestCharBufMimic(t *testing.T) { - cb := NewCharBuf(0) - other := NewCharBuf(0) - other.cat("foo") - cb.Mimic(other) + cb.Cat("foo") if got := cb.ToString(); got != "foo" { t.Errorf("Expected foo, got %v", got) } @@ -38,27 +28,23 @@ func TestCharBufMimic(t *testing.T) { func TestCharBufCatChar(t *testing.T) { cb := NewCharBuf(0) - cb.catChar('x') + cb.CatChar('x') if got := cb.ToString(); got != "x" { t.Errorf("Expected x, got %v", got) } } -func TestCharBufSetSizeGetSize(t *testing.T) { +func TestCharBufGetSize(t *testing.T) { cb := NewCharBuf(0) - cb.cat("abc") - cb.setSize(2) - if got := cb.getSize(); got != 2 { - t.Errorf("Size should be 2 but got %d", got) - } - if got := cb.ToString(); got != "ab" { - t.Errorf("Expected ab, got %v", got) + cb.Cat("abc") + if got := cb.GetSize(); got != 3 { + t.Errorf("Size should be 3 but got %d", got) } } func TestCharBufClone(t *testing.T) { cb := NewCharBuf(0) - cb.cat("foo") + cb.Cat("foo") clone := cb.Clone() if got := clone.ToString(); got != "foo" { t.Errorf("Expected foo, got %v", got) @@ -67,7 +53,7 @@ func TestCharBufClone(t *testing.T) { func TestCharBufYieldString(t *testing.T) { cb := NewCharBuf(0) - cb.cat("foo") + cb.Cat("foo") if got := cb.YieldString(); got != "foo" { t.Errorf("Should yield foo, got %v", got) }
