aboutsummaryrefslogtreecommitdiff
path: root/lib/tabula/record_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2018-09-17 01:21:27 +0700
committerShulhan <ms@kilabit.info>2018-09-18 01:50:21 +0700
commit44b26edf7f390db383fe025454be0c4e30cfbd9b (patch)
tree84d02953bc9095312182534936c1b60667957f07 /lib/tabula/record_test.go
parent4a820ec157501c957d2e30f1670656cceec5c044 (diff)
downloadpakakeh.go-44b26edf7f390db383fe025454be0c4e30cfbd9b.tar.xz
Merge package "github.com/shuLhan/tabula"
Diffstat (limited to 'lib/tabula/record_test.go')
-rw-r--r--lib/tabula/record_test.go35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/tabula/record_test.go b/lib/tabula/record_test.go
new file mode 100644
index 00000000..223f9235
--- /dev/null
+++ b/lib/tabula/record_test.go
@@ -0,0 +1,35 @@
+// Copyright 2017, Shulhan <ms@kilabit.info>. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be found
+// in the LICENSE file.
+
+package tabula
+
+import (
+ "fmt"
+ "testing"
+
+ "github.com/shuLhan/share/lib/test"
+)
+
+//
+// TestRecord simply check how the stringer work.
+//
+func TestRecord(t *testing.T) {
+ expec := []string{"test", "1", "2"}
+ expType := []int{TString, TInteger, TInteger}
+
+ row := make(Row, 0)
+
+ for i := range expec {
+ r, e := NewRecordBy(expec[i], expType[i])
+ if nil != e {
+ t.Error(e)
+ }
+
+ row = append(row, r)
+ }
+
+ exp := fmt.Sprint(expec)
+ got := fmt.Sprint(row)
+ test.Assert(t, "", exp, got, true)
+}