Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for TestPool (0.32 sec)

  1. src/sync/pool_test.go

    	}
    }
    
    // Test that Pool does not hold pointers to previously cached resources.
    func TestPoolGC(t *testing.T) {
    	testPool(t, true)
    }
    
    // Test that Pool releases resources on GC.
    func TestPoolRelease(t *testing.T) {
    	testPool(t, false)
    }
    
    func testPool(t *testing.T, drain bool) {
    	var p Pool
    	const N = 100
    loop:
    	for try := 0; try < 3; try++ {
    		if try == 1 && testing.Short() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8K bytes
    - Viewed (0)
  2. src/syscall/js/js_test.go

    func TestWasmImport(t *testing.T) {
    	a := uint32(3)
    	b := uint32(5)
    	want := a + b
    	if got := testAdd(a, b); got != want {
    		t.Errorf("got %v, want %v", got, want)
    	}
    }
    
    func TestBool(t *testing.T) {
    	want := true
    	o := dummys.Get("someBool")
    	if got := o.Bool(); got != want {
    		t.Errorf("got %#v, want %#v", got, want)
    	}
    	dummys.Set("otherBool", want)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 14:35:26 UTC 2024
    - 17.7K bytes
    - Viewed (0)
  3. src/reflect/all_test.go

    	"runtime"
    	"slices"
    	"strconv"
    	"strings"
    	"sync"
    	"sync/atomic"
    	"testing"
    	"time"
    	"unsafe"
    )
    
    const bucketCount = abi.MapBucketCount
    
    var sink any
    
    func TestBool(t *testing.T) {
    	v := ValueOf(true)
    	if v.Bool() != true {
    		t.Fatal("ValueOf(true).Bool() = false")
    	}
    }
    
    type integer int
    type T struct {
    	a int
    	b float64
    	c string
    	d *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