From 426bf361316ab495a29c9e0a05da6236894dd392 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 23 Apr 2012 15:46:54 -0700 Subject: [PATCH] time: change float expression to ensure it is an integer When I increased the number of bits that gccgo uses for untyped floats, the expression 0.52*1e9 was no longer integral. This patch fixes that. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6113043 --- src/pkg/time/time_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/time/time_test.go b/src/pkg/time/time_test.go index 28047804e09..c48e0a4300c 100644 --- a/src/pkg/time/time_test.go +++ b/src/pkg/time/time_test.go @@ -805,7 +805,7 @@ var jsonTests = []struct { time Time json string }{ - {Date(9999, 4, 12, 23, 20, 50, .52*1e9, UTC), `"9999-04-12T23:20:50.52Z"`}, + {Date(9999, 4, 12, 23, 20, 50, 520*1e6, UTC), `"9999-04-12T23:20:50.52Z"`}, {Date(1996, 12, 19, 16, 39, 57, 0, Local), `"1996-12-19T16:39:57-08:00"`}, {Date(0, 1, 1, 0, 0, 0, 1, FixedZone("", 1*60)), `"0000-01-01T00:00:00.000000001+00:01"`}, }