File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -284,6 +284,30 @@ func TestIntervalStringIntegration(t *testing.T) {
284284 })
285285}
286286
287+ func TestIntervalSimpleEncoding (t * testing.T ) {
288+ skipIfDatetimeUnsupported (t )
289+
290+ conn := test_helpers .ConnectWithValidation (t , dialer , opts )
291+ defer conn .Close ()
292+
293+ ival := Interval {Year : 1 , Month : 2 , Day : 3 }
294+ req := tarantool .NewCallRequest ("call_interval_testdata" ).Args ([]interface {}{ival })
295+ data , err := conn .Do (req ).Get ()
296+ if err != nil {
297+ t .Fatalf ("Failed to call: %s" , err )
298+ }
299+ if len (data ) != 1 {
300+ t .Fatalf ("Expected 1 result, got %d" , len (data ))
301+ }
302+ ret , ok := data [0 ].(Interval )
303+ if ! ok {
304+ t .Fatalf ("Result is not Interval, got %T" , data [0 ])
305+ }
306+ if ! reflect .DeepEqual (ret , ival ) {
307+ t .Fatalf ("Got %v, want %v" , ret , ival )
308+ }
309+ }
310+
287311func TestIntervalStringEdgeCases (t * testing.T ) {
288312 tests := []struct {
289313 name string
You can’t perform that action at this time.
0 commit comments