1
0
mirror of https://github.com/golang/go synced 2024-11-24 09:20:02 -07:00
go/src/time
Joe Tsai c485506b0a time: update TestSub to avoid future regressions
CL 131196 optimized Time.Sub, but was reverted because
it incorrectly computed the nanoseconds in some edge cases.
This CL adds a test case to enforce the correct behavior
so that a future optimization does not break this again.

Updates #17858
Updates #33677

Change-Id: I596d8302ca6bf721cf7ca11cc6f939639fcbdd43
Reviewed-on: https://go-review.googlesource.com/c/go/+/190524
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-08-16 19:54:57 +00:00
..
example_test.go
export_android_test.go
export_test.go
export_windows_test.go
format_test.go
format.go
genzabbrs.go
internal_test.go
mono_test.go
sleep_test.go
sleep.go time: clarify when draining a Timer's channel is needed 2019-07-18 20:43:28 +00:00
sys_plan9.go
sys_unix.go
sys_windows.go
tick_test.go
tick.go
time_test.go time: update TestSub to avoid future regressions 2019-08-16 19:54:57 +00:00
time.go Revert "time: optimize Sub" 2019-08-16 17:01:35 +00:00
zoneinfo_abbrs_windows.go
zoneinfo_android_test.go
zoneinfo_android.go
zoneinfo_ios.go os,time: fix tests on iOS 2019-05-01 13:53:44 +00:00
zoneinfo_js.go
zoneinfo_plan9.go
zoneinfo_read.go
zoneinfo_test.go
zoneinfo_unix.go
zoneinfo_windows_test.go
zoneinfo_windows.go
zoneinfo.go