Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 127 for jest (0.16 sec)

  1. src/cmd/cgo/internal/swig/swig_test.go

    	swigOnce sync.Once
    	haveSwig bool
    )
    
    func mustHaveSwig(t *testing.T) {
    	swigOnce.Do(func() {
    		mustHaveSwigOnce(t)
    		haveSwig = true
    	})
    	// The first call will skip t with a nice message. On later calls, we just skip.
    	if !haveSwig {
    		t.Skip("swig not found")
    	}
    }
    
    func mustHaveSwigOnce(t *testing.T) {
    	swig, err := exec.LookPath("swig")
    	if err != nil {
    		t.Skipf("swig not in PATH: %s", err)
    	}
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  2. src/cmd/asm/internal/asm/pseudo_test.go

    	// Note these errors should be independent of the architecture.
    	// Just run the test with amd64.
    	parser := newParser("amd64")
    	var buf strings.Builder
    	parser.errorWriter = &buf
    
    	for _, cat := range testcats {
    		for _, test := range cat.tests {
    			parser.allowABI = cat.allowABI
    			parser.errorCount = 0
    			parser.lineNum++
    			if !parser.pseudo(test.pseudo, tokenize(test.operands)) {
    				t.Fatalf("Wrong pseudo-instruction: %s", test.pseudo)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  3. src/arena/arena.go

    This functionality in this package is mostly captured in the Arena type.
    Arenas allocate large chunks of memory for Go values, so they're likely to
    be inefficient for allocating only small amounts of small Go values. They're
    best used in bulk, on the order of MiB of memory allocated on each use.
    
    Note that by allowing for this limited form of manual memory allocation
    that use-after-free bugs are possible with regular Go values. This package
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Oct 12 20:23:36 GMT 2022
    - 4.3K bytes
    - Viewed (0)
  4. src/bufio/bufio_test.go

    	src := make([]byte, 10)
    	eofR := &eofReader{buf: src}
    	r := NewReader(eofR)
    
    	// Start by reading 5 of the 10 available bytes.
    	dest := make([]byte, 5)
    	read, err := r.Read(dest)
    	if err != nil {
    		t.Fatalf("unexpected error: %v", err)
    	}
    	if n := len(dest); read != n {
    		t.Fatalf("read %d bytes; wanted %d bytes", read, n)
    	}
    
    	// The Reader should have buffered all the content from the io.Reader.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  5. src/cmd/asm/internal/asm/operand_test.go

    	for _, test := range tests {
    		err := tryParse(t, func() {
    			parser.start(lex.Tokenize(test.input))
    			addr := obj.Addr{}
    			parser.operand(&addr)
    		})
    
    		switch {
    		case err == nil:
    			t.Errorf("fail at %s: got no errors; expected %s\n", test.input, test.error)
    		case !strings.Contains(err.Error(), test.error):
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 18:31:05 GMT 2023
    - 23.9K bytes
    - Viewed (0)
  6. src/archive/zip/reader_test.go

    func TestFS(t *testing.T) {
    	for _, test := range []struct {
    		file string
    		want []string
    	}{
    		{
    			"testdata/unix.zip",
    			[]string{"hello", "dir/bar", "readonly"},
    		},
    		{
    			"testdata/subdir.zip",
    			[]string{"a/b/c"},
    		},
    	} {
    		test := test
    		t.Run(test.file, func(t *testing.T) {
    			t.Parallel()
    			z, err := OpenReader(test.file)
    			if err != nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 55.3K bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/test/issue26743.go

    // license that can be found in the LICENSE file.
    
    //go:build cgo
    
    // Issue 26743: typedef of uint leads to inconsistent typedefs error.
    // No runtime test; just make sure it compiles.
    
    package cgotest
    
    Go
    - Registered: Tue Mar 26 11:13:08 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 356 bytes
    - Viewed (0)
  8. src/archive/tar/strconv_test.go

    			t.Errorf("fitsInBase256(%d, %d): got %v, want %v", v.in, v.width, ok, v.ok)
    		}
    	}
    }
    
    func TestParseNumeric(t *testing.T) {
    	vectors := []struct {
    		in   string
    		want int64
    		ok   bool
    	}{
    		// Test base-256 (binary) encoded values.
    		{"", 0, true},
    		{"\x80", 0, true},
    		{"\x80\x00", 0, true},
    		{"\x80\x00\x00", 0, true},
    		{"\xbf", (1 << 6) - 1, true},
    		{"\xbf\xff", (1 << 14) - 1, true},
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Feb 09 05:28:50 GMT 2021
    - 14K bytes
    - Viewed (0)
  9. src/bufio/export_test.go

    	if n < utf8.UTFMax || n > 1e9 {
    		panic("bad max token size")
    	}
    	if n < len(s.buf) {
    		s.buf = make([]byte, n)
    	}
    	s.maxTokenSize = n
    }
    
    // ErrOrEOF is like Err, but returns EOF. Used to test a corner case.
    func (s *Scanner) ErrOrEOF() error {
    	return s.err
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 17:17:44 GMT 2017
    - 597 bytes
    - Viewed (0)
  10. src/bytes/buffer_test.go

    			}
    		}
    		if err != test.err {
    			t.Errorf("expected error %v, got %v", test.err, err)
    		}
    	}
    }
    
    func TestReadString(t *testing.T) {
    	for _, test := range readBytesTests {
    		buf := NewBufferString(test.buffer)
    		var err error
    		for _, expected := range test.expected {
    			var s string
    			s, err = buf.ReadString(test.delim)
    			if s != expected {
    				t.Errorf("expected %q, got %q", expected, s)
    			}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
Back to top