- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 93 for maxInt (0.09 sec)
-
src/internal/types/testdata/spec/range_int.go
} func issue65133() { for range maxInt { } for range maxInt /* ERROR "cannot use maxInt + 1 (untyped int constant 9223372036854775808) as int value in range clause (overflows)" */ + 1 { } for range maxUint /* ERROR "cannot use maxUint (untyped int constant 18446744073709551615) as int value in range clause (overflows)" */ { } for i := range maxInt { _ = i }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 18:56:00 UTC 2024 - 4.7K bytes - Viewed (0) -
api/go1.17.txt
pkg math (darwin-arm64), const MaxUint = 18446744073709551615 pkg math (darwin-arm64), const MinInt = -9223372036854775808 pkg math (darwin-arm64-cgo), const MaxInt = 9223372036854775807 pkg math (darwin-arm64-cgo), const MaxUint = 18446744073709551615 pkg math (darwin-arm64-cgo), const MinInt = -9223372036854775808 pkg math (freebsd-386), const MaxInt = 2147483647 pkg math (freebsd-386), const MaxUint = 4294967295
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 17 20:31:46 UTC 2023 - 18K bytes - Viewed (0) -
src/internal/types/testdata/check/const1.go
) const ( _ int = minInt /* ERROR "overflows" */ - 1 _ int = minInt _ int = maxInt _ int = maxInt /* ERROR "overflows" */ + 1 _ int = smallestFloat64 /* ERROR "truncated" */ _ = int(minInt /* ERROR "overflows" */ - 1) _ = int(minInt) _ = int(maxInt) _ = int(maxInt /* ERROR "overflows" */ + 1) _ = int(smallestFloat64 /* ERROR "cannot convert" */) ) const (
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 31 16:11:16 UTC 2023 - 8.5K bytes - Viewed (0) -
src/internal/saferio/io_test.go
} }) t.Run("large", func(t *testing.T) { _, err := ReadData(bytes.NewReader(input), 10<<30) if err == nil { t.Error("large read succeeded unexpectedly") } }) t.Run("maxint", func(t *testing.T) { _, err := ReadData(bytes.NewReader(input), 1<<62) if err == nil { t.Error("large read succeeded unexpectedly") } }) t.Run("small-EOF", func(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 31 00:34:05 UTC 2023 - 3.1K bytes - Viewed (0) -
src/math/const_test.go
t.Errorf("MaxUint64 should wrap around to zero: %d", v+1) } } func TestMaxInt(t *testing.T) { if v := int(MaxInt); v+1 != MinInt { t.Errorf("MaxInt should wrap around to MinInt: %d", v+1) } if v := int8(MaxInt8); v+1 != MinInt8 { t.Errorf("MaxInt8 should wrap around to MinInt8: %d", v+1) } if v := int16(MaxInt16); v+1 != MinInt16 { t.Errorf("MaxInt16 should wrap around to MinInt16: %d", v+1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 03 22:44:33 UTC 2021 - 1.3K bytes - Viewed (0) -
test/fixedbugs/issue29190.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "strings" ) type T struct{} const maxInt = int(^uint(0) >> 1) func main() { s := make([]T, maxInt) shouldPanic("len out of range", func() { s = append(s, T{}) }) var oneElem = make([]T, 1) shouldPanic("len out of range", func() { s = append(s, oneElem...) }) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 08 16:58:57 UTC 2022 - 707 bytes - Viewed (0) -
src/slices/slices_test.go
{x: make([]struct{}, math.MaxInt/6-5), count: 6, want: make([]struct{}, 6*(math.MaxInt/6-5))}, {x: make([]struct{}, math.MaxInt/7-6), count: 7, want: make([]struct{}, 7*(math.MaxInt/7-6))}, {x: make([]struct{}, math.MaxInt/8-7), count: 8, want: make([]struct{}, 8*(math.MaxInt/8-7))}, {x: make([]struct{}, math.MaxInt/9-8), count: 9, want: make([]struct{}, 9*(math.MaxInt/9-8))}, } {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 13:32:06 UTC 2024 - 33.2K bytes - Viewed (0) -
src/go/doc/testdata/b.0.golden
C5 ) // const C notExported = 0 // const Pi = 3.14 // Pi VARIABLES // var ( U1, U2, U4, U5 notExported U7 notExported = 7 ) // var MaxInt int // MaxInt // var V notExported // var V1, V2, V4, V5 notExported FUNCTIONS // Associated with comparable type if AllDecls is set. func ComparableFactory() comparable //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 11 16:05:02 UTC 2022 - 766 bytes - Viewed (0) -
src/internal/concurrent/hashtriemap_test.go
expectPresent(t, s, i)(m.Load(s)) expectLoaded(t, s, i)(m.LoadOrStore(s, 0)) } for i, s := range testData { expectPresent(t, s, i)(m.Load(s)) expectNotDeleted(t, s, math.MaxInt)(m.CompareAndDelete(s, math.MaxInt)) expectDeleted(t, s, i)(m.CompareAndDelete(s, i)) expectNotDeleted(t, s, i)(m.CompareAndDelete(s, i)) expectMissing(t, s, 0)(m.Load(s)) } for _, s := range testData {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 16:01:55 UTC 2024 - 9.3K bytes - Viewed (0) -
src/math/const.go
) // Integer limit values. const ( intSize = 32 << (^uint(0) >> 63) // 32 or 64 MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 // 127 MinInt8 = -1 << 7 // -128 MaxInt16 = 1<<15 - 1 // 32767
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 21 14:07:39 UTC 2022 - 2.8K bytes - Viewed (0)