lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [11/16] lucy git commit: Test I32Array Go bindings.
Date Fri, 11 Sep 2015 22:00:36 GMT
Test I32Array Go bindings.


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

Branch: refs/heads/master
Commit: db2c25da42f9b34aaabfd7c89b009229d04a1063
Parents: a7aa779
Author: Marvin Humphrey <marvin@rectangular.com>
Authored: Wed Aug 12 17:43:39 2015 -0700
Committer: Marvin Humphrey <marvin@rectangular.com>
Committed: Wed Sep 9 18:25:24 2015 -0700

----------------------------------------------------------------------
 go/lucy/object_test.go | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/db2c25da/go/lucy/object_test.go
----------------------------------------------------------------------
diff --git a/go/lucy/object_test.go b/go/lucy/object_test.go
index 51ebe83..f78fd69 100644
--- a/go/lucy/object_test.go
+++ b/go/lucy/object_test.go
@@ -119,4 +119,13 @@ func TestBitVecBool(t *testing.T) {
 	}
 }
 
-
+func TestI32ArrBasics(t *testing.T) {
+	arr := NewI32Array([]int32{42, 43})
+	if size := arr.GetSize(); size != 2 {
+		t.Errorf("Unexpected size: %d", size)
+	}
+	arr.Set(1, 101)
+	if got := arr.Get(1); got != 101 {
+		t.Errorf("Unexpected value: %d", got)
+	}
+}


Mime
View raw message