Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for TestAllocations (0.11 sec)

  1. src/crypto/internal/edwards25519/edwards25519_test.go

    				t.Errorf("re-encoding does not match canonical; got %q, expected %q", encoding, tt.canonical)
    			}
    			checkOnCurve(t, p1, p2)
    		})
    	}
    }
    
    var testAllocationsSink byte
    
    func TestAllocations(t *testing.T) {
    	testenv.SkipIfOptimizationOff(t)
    
    	if allocs := testing.AllocsPerRun(100, func() {
    		p := NewIdentityPoint()
    		p.Add(p, NewGeneratorPoint())
    		s := NewScalar()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 10 18:45:00 UTC 2022
    - 9.3K bytes
    - Viewed (0)
  2. src/crypto/internal/nistec/nistec_test.go

    package nistec_test
    
    import (
    	"bytes"
    	"crypto/elliptic"
    	"crypto/internal/nistec"
    	"fmt"
    	"internal/testenv"
    	"math/big"
    	"math/rand"
    	"testing"
    )
    
    func TestAllocations(t *testing.T) {
    	testenv.SkipIfOptimizationOff(t)
    
    	t.Run("P224", func(t *testing.T) {
    		if allocs := testing.AllocsPerRun(10, func() {
    			p := nistec.NewP224Point().SetGenerator()
    			scalar := make([]byte, 28)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 12 18:48:23 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  3. src/crypto/ed25519/ed25519_test.go

    		0xb1, 0x08, 0xc3, 0xbd, 0xae, 0x36, 0x9e, 0xf5, 0x49, 0xfa,
    	}
    
    	if Verify(publicKey, msg, sig) {
    		t.Fatal("non-canonical signature accepted")
    	}
    }
    
    func TestAllocations(t *testing.T) {
    	if boring.Enabled {
    		t.Skip("skipping allocations test with BoringCrypto")
    	}
    	testenv.SkipIfOptimizationOff(t)
    
    	if allocs := testing.AllocsPerRun(100, func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  4. src/crypto/md5/md5_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) {
    	in := []byte("hello, world!")
    	out := make([]byte, 0, Size)
    	h := New()
    	n := int(testing.AllocsPerRun(10, func() {
    		h.Reset()
    		h.Write(in)
    		out = h.Sum(out[:0])
    	}))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 23 16:54:46 UTC 2021
    - 17.4K bytes
    - Viewed (0)
  5. src/crypto/rsa/rsa_test.go

    	if err != nil {
    		t.Errorf("DecryptPKCS1v15: %v", err)
    		return
    	}
    	if !bytes.Equal(dec, msg) {
    		t.Errorf("got:%x want:%x (%+v)", dec, msg, priv)
    	}
    }
    
    func TestAllocations(t *testing.T) {
    	if boring.Enabled {
    		t.Skip("skipping allocations test with BoringCrypto")
    	}
    	testenv.SkipIfOptimizationOff(t)
    
    	m := []byte("Hello Gophers")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 12 00:55:41 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  6. src/internal/reflectlite/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 = []int{j, j, j}
    		v = ValueOf(i)
    		if v.Len() != 3 {
    			panic("wrong length")
    		}
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 19:26:08 UTC 2023
    - 24.2K bytes
    - Viewed (0)
  7. src/crypto/sha1/sha1_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:27:16 UTC 2023
    - 18.3K bytes
    - Viewed (0)
  8. src/cmd/internal/notsha256/sha256_test.go

    	rand.Read(buf)
    	blockGeneric(gen, buf)
    	block(asm, buf)
    	if *gen != *asm {
    		t.Error("block and blockGeneric resulted in different states")
    	}
    }
    
    func TestAllocations(t *testing.T) {
    	in := []byte("hello, world!")
    	out := make([]byte, 0, Size)
    	h := New()
    	n := int(testing.AllocsPerRun(10, func() {
    		h.Reset()
    		h.Write(in)
    		out = h.Sum(out[:0])
    	}))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 29 14:23:17 UTC 2022
    - 16.2K bytes
    - Viewed (0)
  9. src/crypto/sha256/sha256_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:21:42 UTC 2023
    - 34.8K bytes
    - Viewed (0)
  10. 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)
Back to top