[Groonga-commit] groonga/grngo at ed15ed3 [master] Add TestNoKeyValue().

Back to archive index

susumu.yata null+****@clear*****
Wed Jul 29 22:03:42 JST 2015


susumu.yata	2015-07-29 22:03:42 +0900 (Wed, 29 Jul 2015)

  New Revision: ed15ed381d6ac1cd4f37646976f01016ffef3f6c
  https://github.com/groonga/grngo/commit/ed15ed381d6ac1cd4f37646976f01016ffef3f6c

  Message:
    Add TestNoKeyValue().

  Modified files:
    grngo_test.go

  Modified: grngo_test.go (+13 -0)
===================================================================
--- grngo_test.go    2015-07-29 21:59:39 +0900 (fa1a2e4)
+++ grngo_test.go    2015-07-29 22:03:42 +0900 (e26a347)
@@ -273,6 +273,19 @@ func TestDB(t *testing.T) {
 	defer db2.Close()
 }
 
+func TestNoKeyValue(t *testing.T) {
+	dirPath, _, db := createTempDB(t)
+	defer removeTempDB(t, dirPath, db)
+
+	table, err := db.CreateTable("Table", nil)
+	if err != nil {
+		t.Fatalf("DB.CreateTable() failed: %v", err)
+	}
+	if _, err := table.FindColumn("_key"); err == nil {
+		t.Fatalf("Table.FindColumn() succeeded for undefined _key")
+	}
+}
+
 func TestKey(t *testing.T) {
 	dirPath, _, db := createTempDB(t)
 	defer removeTempDB(t, dirPath, db)
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index