diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-09-29 12:46:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-29 12:46:30 -0700 |
commit | b84736e9b6401df0c6eeab9950bef09458a6aefd (patch) | |
tree | d9175208de3236db75a33879750a57b3000ba096 /vendor/github.com/lib/pq/encode_test.go | |
parent | 8b9dbb86133ff0fd6002a391268383d1593918ca (diff) | |
download | chat-b84736e9b6401df0c6eeab9950bef09458a6aefd.tar.gz chat-b84736e9b6401df0c6eeab9950bef09458a6aefd.tar.bz2 chat-b84736e9b6401df0c6eeab9950bef09458a6aefd.zip |
Updating server dependancies. (#7538)
Diffstat (limited to 'vendor/github.com/lib/pq/encode_test.go')
-rw-r--r-- | vendor/github.com/lib/pq/encode_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/github.com/lib/pq/encode_test.go b/vendor/github.com/lib/pq/encode_test.go index 3a0f7286e..837d45bec 100644 --- a/vendor/github.com/lib/pq/encode_test.go +++ b/vendor/github.com/lib/pq/encode_test.go @@ -37,6 +37,8 @@ var timeTests = []struct { }{ {"22001-02-03", time.Date(22001, time.February, 3, 0, 0, 0, 0, time.FixedZone("", 0))}, {"2001-02-03", time.Date(2001, time.February, 3, 0, 0, 0, 0, time.FixedZone("", 0))}, + {"0001-12-31 BC", time.Date(0, time.December, 31, 0, 0, 0, 0, time.FixedZone("", 0))}, + {"2001-02-03 BC", time.Date(-2000, time.February, 3, 0, 0, 0, 0, time.FixedZone("", 0))}, {"2001-02-03 04:05:06", time.Date(2001, time.February, 3, 4, 5, 6, 0, time.FixedZone("", 0))}, {"2001-02-03 04:05:06.000001", time.Date(2001, time.February, 3, 4, 5, 6, 1000, time.FixedZone("", 0))}, {"2001-02-03 04:05:06.00001", time.Date(2001, time.February, 3, 4, 5, 6, 10000, time.FixedZone("", 0))}, @@ -86,15 +88,22 @@ func TestParseTs(t *testing.T) { } var timeErrorTests = []string{ + "BC", + " BC", "2001", "2001-2-03", "2001-02-3", "2001-02-03 ", + "2001-02-03 B", "2001-02-03 04", "2001-02-03 04:", "2001-02-03 04:05", + "2001-02-03 04:05 B", + "2001-02-03 04:05 BC", "2001-02-03 04:05:", "2001-02-03 04:05:6", + "2001-02-03 04:05:06 B", + "2001-02-03 04:05:06BC", "2001-02-03 04:05:06.123 B", } |