You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2015/12/12 12:30:51 UTC

[5/6] lucy-clownfish git commit: Fix public ByteBuf methods in Go bindings

Fix public ByteBuf methods in Go bindings


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

Branch: refs/heads/master
Commit: b42f55e4af5ac615c91a0b8e0b72180d0a6462b0
Parents: 7165ca5
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Dec 9 18:26:02 2015 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Dec 9 18:26:02 2015 +0100

----------------------------------------------------------------------
 runtime/go/clownfish/bytebuf_test.go | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/b42f55e4/runtime/go/clownfish/bytebuf_test.go
----------------------------------------------------------------------
diff --git a/runtime/go/clownfish/bytebuf_test.go b/runtime/go/clownfish/bytebuf_test.go
index 2cc2a27..fba7708 100644
--- a/runtime/go/clownfish/bytebuf_test.go
+++ b/runtime/go/clownfish/bytebuf_test.go
@@ -22,8 +22,8 @@ import "reflect"
 func TestByteBufCat(t *testing.T) {
 	bb := NewByteBuf(0)
 	content := []byte("foo")
-	bb.cat(content)
-	if got := bb.yieldBlob(); !reflect.DeepEqual(got, content) {
+	bb.Cat(content)
+	if got := bb.YieldBlob(); !reflect.DeepEqual(got, content) {
 		t.Errorf("Expected %v, got %v", content, got)
 	}
 }
@@ -31,20 +31,20 @@ func TestByteBufCat(t *testing.T) {
 func TestByteBufSetSizeGetSize(t *testing.T) {
 	bb := NewByteBuf(0)
 	content := []byte("abc")
-	bb.cat(content)
-	bb.setSize(2)
-	if got := bb.getSize(); got != 2 {
+	bb.Cat(content)
+	bb.SetSize(2)
+	if got := bb.GetSize(); got != 2 {
 		t.Errorf("Expected size 2, got %d", got)
 	}
 	expected := []byte("ab")
-	if got := bb.yieldBlob(); !reflect.DeepEqual(got, expected) {
+	if got := bb.YieldBlob(); !reflect.DeepEqual(got, expected) {
 		t.Errorf("Expected %v, got %v", expected, got)
 	}
 }
 
 func TestByteBufGetCapacity(t *testing.T) {
 	bb := NewByteBuf(5)
-	if cap := bb.getCapacity(); cap < 5 {
+	if cap := bb.GetCapacity(); cap < 5 {
 		t.Errorf("Expected at least 5, got %d", cap)
 	}
 }
@@ -53,12 +53,12 @@ func TestByteBufEquals(t *testing.T) {
 	bb := NewByteBuf(0)
 	other := NewByteBuf(0)
 	content := []byte("foo")
-	bb.cat(content)
-	other.cat(content)
+	bb.Cat(content)
+	other.Cat(content)
 	if !bb.Equals(other) {
 		t.Errorf("Equals against equal ByteBuf")
 	}
-	other.setSize(2)
+	other.SetSize(2)
 	if bb.Equals(other) {
 		t.Errorf("Equals against non-equal ByteBuf")
 	}
@@ -70,9 +70,9 @@ func TestByteBufEquals(t *testing.T) {
 func TestByteBufClone(t *testing.T) {
 	content := []byte("foo")
 	bb := NewByteBuf(0)
-	bb.cat(content)
+	bb.Cat(content)
 	clone := bb.Clone().(ByteBuf)
-	if got := clone.yieldBlob(); !reflect.DeepEqual(got, content) {
+	if got := clone.YieldBlob(); !reflect.DeepEqual(got, content) {
 		t.Errorf("Expected %v, got %v", content, got)
 	}
 }
@@ -81,12 +81,12 @@ func TestByteBufCompareTo(t *testing.T) {
 	bb := NewByteBuf(0)
 	other := NewByteBuf(0)
 	content := []byte("foo")
-	bb.cat(content)
-	other.cat(content)
+	bb.Cat(content)
+	other.Cat(content)
 	if got := bb.CompareTo(other); got != 0 {
 		t.Errorf("CompareTo equal, got %d", got)
 	}
-	other.setSize(2)
+	other.SetSize(2)
 	if got := bb.CompareTo(other); got <= 0 {
 		t.Errorf("CompareTo lesser, got %d", got)
 	}