Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for fails (0.18 sec)

  1. src/cmd/cgo/internal/test/issue29563.go

    // Copyright 2019 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build cgo && !windows
    
    // Issue 29563: internal linker fails on duplicate weak symbols.
    // 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
    - 363 bytes
    - Viewed (0)
  2. src/archive/tar/strconv.go

    	binBits := uint(n-1) * 8
    	return n >= 9 || (x >= -1<<binBits && x < 1<<binBits)
    }
    
    // parseNumeric parses the input as being encoded in either base-256 or octal.
    // This function may return negative numbers.
    // If parsing fails or an integer overflow occurs, err will be set.
    func (p *parser) parseNumeric(b []byte) int64 {
    	// Check for base-256 (binary) format first.
    	// If the first bit is set, then all following bits constitute a two's
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Aug 01 14:28:42 GMT 2023
    - 9K bytes
    - Viewed (0)
  3. src/bufio/bufio_test.go

    	br.ReadRune()
    	br.Peek(1)
    	if err := br.UnreadRune(); err == nil {
    		t.Error("UnreadRune didn't fail after Peek")
    	}
    }
    
    func TestNoUnreadByteAfterPeek(t *testing.T) {
    	br := NewReader(strings.NewReader("example"))
    	br.ReadByte()
    	br.Peek(1)
    	if err := br.UnreadByte(); err == nil {
    		t.Error("UnreadByte didn't fail after Peek")
    	}
    }
    
    func TestNoUnreadRuneAfterDiscard(t *testing.T) {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  4. src/bytes/bytes.go

    				return i
    			}
    			fails++
    			i++
    			// Switch to bytealg.Index when IndexByte produces too many false positives.
    			if fails > bytealg.Cutover(i) {
    				r := bytealg.Index(s[i:], sep)
    				if r >= 0 {
    					return r + i
    				}
    				return -1
    			}
    		}
    		return -1
    	}
    	c0 := sep[0]
    	c1 := sep[1]
    	i := 0
    	fails := 0
    	t := len(s) - n + 1
    	for i < t {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/test/cgo_stubs_android_test.go

    // Copyright 2012 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package cgotest
    
    import "testing"
    
    // Stubs for tests that fails to build on Android
    func test6997(t *testing.T)        {}
    func test8694(t *testing.T)        {}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 359 bytes
    - Viewed (0)
  6. src/bytes/buffer.go

    			return n, nil // e is EOF, so return nil explicitly
    		}
    		if e != nil {
    			return n, e
    		}
    	}
    }
    
    // growSlice grows b by n, preserving the original content of b.
    // If the allocation fails, it panics with ErrTooLarge.
    func growSlice(b []byte, n int) []byte {
    	defer func() {
    		if recover() != nil {
    			panic(ErrTooLarge)
    		}
    	}()
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  7. src/clean.bat

    L9:set GOBUILDFAIL=0
    L10:
    L11:go tool dist env -w -p >env.bat
    L12:if errorlevel 1 goto fail
    L13:call .\env.bat
    L14:del env.bat
    L15:echo.
    L16:
    L17:if exist %GOTOOLDIR%\dist.exe goto distok
    L18:echo cannot find %GOTOOLDIR%\dist; nothing to clean
    L19:goto fail
    L20::distok
    L21:
    L22:"%GOBIN%\go" clean -i std
    L23:"%GOBIN%\go" tool dist clean
    L24:"%GOBIN%\go" clean -i cmd
    L25:
    L26:goto end
    L27:
    L28::fail
    L29:set GOBUILDFAIL=1
    L30:
    L31::end
    L32:if x%GOBUILDEXIT%==x1 exit %GOBUILDFAIL%
    ...
    Batch File
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu May 12 16:59:17 GMT 2022
    - 600 bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/test/issue18146.go

    		cmd.Stdout = buf
    		cmd.Stderr = buf
    		if err := cmd.Start(); err != nil {
    			// We are starting so many processes that on
    			// some systems (problem seen on Darwin,
    			// Dragonfly, OpenBSD) the fork call will fail
    			// with EAGAIN.
    			if pe, ok := err.(*os.PathError); ok {
    				err = pe.Err
    			}
    			if se, ok := err.(syscall.Errno); ok && (se == syscall.EAGAIN || se == syscall.EMFILE) {
    				time.Sleep(time.Millisecond)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Sep 05 23:35:32 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  9. doc/go1.17_spec.html

    func Split(s string, pos int) (string, string) {
    	return s[0:pos], s[pos:]
    }
    
    func Join(s, t string) string {
    	return s + t
    }
    
    if Join(Split(value, len(value)/2)) != value {
    	log.Panic("test fails")
    }
    </pre>
    
    <p>
    A method call <code>x.m()</code> is valid if the <a href="#Method_sets">method set</a>
    of (the type of) <code>x</code> contains <code>m</code> and the
    HTML
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
  10. src/cmd/asm/internal/asm/operand_test.go

    			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):
    			t.Errorf("fail at %s: got %s; expected %s", test.input, err, test.error)
    		}
    	}
    }
    
    func testOperandParser(t *testing.T, parser *Parser, tests []operandTest) {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Aug 29 18:31:05 GMT 2023
    - 23.9K bytes
    - Viewed (0)
Back to top