From bd401baef2349e41d99280557bd5d709be78c894 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 27 May 2014 16:01:43 -0700 Subject: [PATCH] test: add test for fixed issue 7863 Fixes #7863 LGTM=rsc R=rsc, ruiu CC=golang-codereviews https://golang.org/cl/98610045 --- test/fixedbugs/issue7863.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/fixedbugs/issue7863.go diff --git a/test/fixedbugs/issue7863.go b/test/fixedbugs/issue7863.go new file mode 100644 index 0000000000..796db6a98f --- /dev/null +++ b/test/fixedbugs/issue7863.go @@ -0,0 +1,17 @@ +// run + +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import "time" + +func main() { + now := time.Now() + f := now.Unix + if now.Unix() != f() { + println("BUG: ", now.Unix(), "!=", f()) + } +} -- 2.50.0