Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for TestAllocations (0.76 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
Back to top