Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for allowsPerRun (0.1 sec)

  1. src/os/os_windows_test.go

    		t.Error(err)
    	}
    }
    
    func TestUTF16Alloc(t *testing.T) {
    	allowsPerRun := func(want int, f func()) {
    		t.Helper()
    		got := int(testing.AllocsPerRun(5, f))
    		if got != want {
    			t.Errorf("got %d allocs, want %d", got, want)
    		}
    	}
    	allowsPerRun(1, func() {
    		syscall.UTF16ToString([]uint16{'a', 'b', 'c'})
    	})
    	allowsPerRun(1, func() {
    		syscall.UTF16FromString("abc")
    	})
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 41.8K bytes
    - Viewed (0)
Back to top