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/12 00:00:36 UTC
[11/16] lucy git commit: Test I32Array Go bindings.
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 <ma...@rectangular.com>
Authored: Wed Aug 12 17:43:39 2015 -0700
Committer: Marvin Humphrey <ma...@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)
+ }
+}