Helper function to create expected timestamp RowValue for tests
(rfc3339 string, accuracy int32)
| 87 | |
| 88 | // Helper function to create expected timestamp RowValue for tests |
| 89 | func timestampRowValue(rfc3339 string, accuracy int32) *v1pb.RowValue { |
| 90 | t, _ := time.Parse(time.RFC3339Nano, rfc3339) |
| 91 | return &v1pb.RowValue{Kind: &v1pb.RowValue_TimestampValue{ |
| 92 | TimestampValue: &v1pb.RowValue_Timestamp{ |
| 93 | GoogleTimestamp: timestamppb.New(t), |
| 94 | Accuracy: accuracy, |
| 95 | }, |
| 96 | }} |
| 97 | } |
| 98 | |
| 99 | func TestConvertSpannerValue(t *testing.T) { |
| 100 | tests := []struct { |
no outgoing calls
no test coverage detected