]> Cypherpunks repositories - gostls13.git/commit
math: add MaxUint, MinInt, MaxInt
authorColin Arnott <colin@urandom.co.uk>
Thu, 6 Aug 2020 02:57:15 +0000 (02:57 +0000)
committerIan Lance Taylor <iant@golang.org>
Mon, 3 May 2021 22:44:33 +0000 (22:44 +0000)
commite8eb1d82690c5c70df770df41ca237e5756f21d5
treecb124e98fa5ff78dd0f1349d8b97a5dd53bfcf79
parented5ebd32b3b8f66515522e8f09bc9dc023c0901c
math: add MaxUint, MinInt, MaxInt

Since we have int8 to int64 min max and uint8 to uint64 max constants,
we should probably have some for the word size types too. This change
also adds tests to validate the correctness of all integer limit
values.

Fixes #28538

Change-Id: Idd25782e98d16c2abedf39959b7b66e9c4c0c98b
Reviewed-on: https://go-review.googlesource.com/c/go/+/247058
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Robert Griesemer <gri@golang.org>
src/math/const.go
src/math/const_test.go [new file with mode: 0644]