- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for TestAllocations (0.15 sec)
-
src/crypto/sha512/sha512_test.go
continue } if fmt.Sprintf("%x", sum) != test.sum { t.Errorf("test %d sum mismatch: expect %s got %x", i, test.sum, sum) } } } func TestAllocations(t *testing.T) { if boring.Enabled { t.Skip("BoringCrypto doesn't allocate the same way as stdlib") } in := []byte("hello, world!") out := make([]byte, 0, Size) h := New()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 03 21:17:08 UTC 2023 - 105.6K bytes - Viewed (0) -
src/reflect/all_test.go
} i := -1 allocs := testing.AllocsPerRun(n, func() { f(i) i++ }) if allocs > 0 { t.Errorf("%d iterations: got %v mallocs, want 0", n, allocs) } } func TestAllocations(t *testing.T) { noAlloc(t, 100, func(j int) { var i any var v Value i = 42 + j v = ValueOf(i) if int(v.Int()) != 42+j { panic("wrong int") } })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 218.8K bytes - Viewed (0)