lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [12/14] lucy git commit: Test Go bindings for LockFactory.
Date Sat, 31 Oct 2015 22:22:27 GMT
Test Go bindings for LockFactory.


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

Branch: refs/heads/master
Commit: a7f6c9f4f775f6378b216ba093eb5f3b1e3bc285
Parents: bda80a7
Author: Marvin Humphrey <marvin@rectangular.com>
Authored: Tue Oct 27 19:37:08 2015 -0700
Committer: Marvin Humphrey <marvin@rectangular.com>
Committed: Tue Oct 27 19:37:08 2015 -0700

----------------------------------------------------------------------
 go/lucy/store_test.go | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/a7f6c9f4/go/lucy/store_test.go
----------------------------------------------------------------------
diff --git a/go/lucy/store_test.go b/go/lucy/store_test.go
index fb2fdc7..29ed837 100644
--- a/go/lucy/store_test.go
+++ b/go/lucy/store_test.go
@@ -685,3 +685,16 @@ func TestSharedLockAll(t *testing.T) {
 	}
 	runLockCommonTests(t, makeLock)
 }
+
+func TestLockFactoryAll(t *testing.T) {
+	folder := NewRAMFolder("")
+	factory := NewLockFactory(folder, "dev.example.com")
+	lock := factory.MakeLock("write", 10, 42)
+	if _, ok := lock.(Lock); !ok {
+		t.Errorf("MakeLock")
+	}
+	shlock := factory.MakeSharedLock("read", 10, 42)
+	if _, ok := shlock.(SharedLock); !ok {
+		t.Errorf("MakeSharedLock")
+	}
+}


Mime
View raw message