[Groonga-commit] groonga/grnci at 0d82bc9 [master] Add a test for grn_ts

Back to archive index

Susumu Yata null+****@clear*****
Tue Feb 16 03:52:08 JST 2016


Susumu Yata	2016-02-16 03:52:08 +0900 (Tue, 16 Feb 2016)

  New Revision: 0d82bc9b0d6ff13b27802ddf392e2918b5731a5a
  https://github.com/groonga/grnci/commit/0d82bc9b0d6ff13b27802ddf392e2918b5731a5a

  Message:
    Add a test for grn_ts

  Modified files:
    grnci_test.go

  Modified: grnci_test.go (+17 -0)
===================================================================
--- grnci_test.go    2016-02-16 03:45:20 +0900 (ba13ce8)
+++ grnci_test.go    2016-02-16 03:52:08 +0900 (1bdbcbe)
@@ -376,6 +376,23 @@ func TestSelect(t *testing.T) {
 	} else if n != 1 {
 		t.Fatalf("DB.Select() failed: n = %d", n)
 	}
+
+	type tblRec2 struct {
+		Key    Text    `grnci:"_key;;TABLE_PAT_KEY"`
+		Bool   Bool    `grnci:"!bool"`
+		Int    Int     `grnci:"int+2;Int32"`
+		Float  Float   `grnci:"float*2.0"`
+	}
+
+	options := NewSelectOptions()
+	options.Filter = "?"
+	var recs2 []tblRec2
+	n, err = db.Select("tbl", &recs2, options)
+	if err != nil {
+		t.Fatalf("DB.Select() failed: %v", err)
+	} else if n != 1 {
+		t.Fatalf("DB.Select() failed: n = %d", n)
+	}
 }
 
 // TestColumnRemove() tests DB.ColumnRemove().
-------------- next part --------------
HTML����������������������������...
Download 



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