diff options
| author | Shulhan <ms@kilabit.info> | 2018-09-17 01:21:27 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2018-09-18 01:50:21 +0700 |
| commit | 44b26edf7f390db383fe025454be0c4e30cfbd9b (patch) | |
| tree | 84d02953bc9095312182534936c1b60667957f07 /lib/tabula/record_test.go | |
| parent | 4a820ec157501c957d2e30f1670656cceec5c044 (diff) | |
| download | pakakeh.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.go | 35 |
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) +} |
