Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 53 for ok (0.15 sec)

  1. src/archive/tar/strconv_test.go

    		{0, 12, true},
    		{math.MinInt64, 12, true},
    	}
    
    	for _, v := range vectors {
    		ok := fitsInBase256(v.width, v.in)
    		if ok != v.ok {
    			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},
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Feb 09 05:28:50 GMT 2021
    - 14K bytes
    - Viewed (0)
  2. src/cmd/cgo/ast.go

    			if decl.Recv != nil && len(decl.Recv.List) > 0 {
    				recvType := decl.Recv.List[0].Type
    				if recvType != nil {
    					t := recvType
    					if star, ok := unparen(t).(*ast.StarExpr); ok {
    						t = star.X
    					}
    					if sel, ok := unparen(t).(*ast.SelectorExpr); ok {
    						var buf strings.Builder
    						format.Node(&buf, fset, recvType)
    						error_(sel.Pos(), `cannot define new methods on non-local type %s`, &buf)
    					}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jun 07 16:54:27 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  3. src/cmd/api/api_test.go

    			ok:       false,
    			out:      "+A\n+C\n+E\n+F\n",
    		},
    		{
    			name:     "feature removed",
    			features: []string{"C", "A"},
    			required: []string{"A", "B", "C"},
    			ok:       false,
    			out:      "-B\n",
    		},
    		{
    			name:      "exception removal",
    			features:  []string{"A", "C"},
    			required:  []string{"A", "B", "C"},
    			exception: []string{"B"},
    			ok:        true,
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jan 04 17:31:12 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/test/issue18146.go

    			// 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)
    				continue
    			}
    
    			t.Error(err)
    			return
    		}
    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)
  5. src/all.bat

    reserved.
    L2::: Use of this source code is governed by a BSD-style
    L3::: license that can be found in the LICENSE file.
    L4:
    L5:@echo off
    L6:
    L7:setlocal
    L8:
    L9:if exist make.bat goto ok
    L10:echo all.bat must be run from go\src
    L11::: cannot exit: would kill parent command interpreter
    L12:goto end
    L13::ok
    L14:
    L15:call .\make.bat --no-banner --no-local
    L16:if %GOBUILDFAIL%==1 goto end
    L17:call .\run.bat --no-rebuild --no-local
    L18:if %GOBUILDFAIL%==1 goto end
    L19:"%GOTOOLDIR%/dist" banner
    ...
    Batch File
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Apr 19 14:36:22 GMT 2023
    - 543 bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/swig/testdata/callback/main.go

    		fatal("usage: callback testname")
    	}
    	switch os.Args[1] {
    	default:
    		fatal("unknown test %q", os.Args[1])
    	case "Call":
    		testCall()
    	case "Callback":
    		testCallback()
    	}
    	println("OK")
    }
    
    func fatal(f string, args ...any) {
    	fmt.Fprintln(os.Stderr, fmt.Sprintf(f, args...))
    	os.Exit(1)
    }
    
    type GoCallback struct{}
    
    func (p *GoCallback) Run() string {
    	return "GoCallback.Run"
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 1K bytes
    - Viewed (0)
  7. src/cmd/asm/internal/asm/operand_test.go

    //
    // For unexpected panics, calls t.Fatal.
    func tryParse(t *testing.T, parse func()) (err error) {
    	panicOnError = true
    	defer func() {
    		panicOnError = false
    
    		e := recover()
    		var ok bool
    		if err, ok = e.(error); e != nil && !ok {
    			t.Fatal(e)
    		}
    	}()
    
    	parse()
    
    	return nil
    }
    
    func testBadOperandParser(t *testing.T, parser *Parser, tests []badOperandTest) {
    	for _, test := range tests {
    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)
  8. src/cmd/cgo/internal/swig/swig_test.go

    		cmd.Env = append(cmd.Environ(),
    			"CGO_CFLAGS="+cflags,
    			"CGO_CXXFLAGS="+cflags,
    			"CGO_LDFLAGS="+cflags)
    	}
    	out, err := cmd.CombinedOutput()
    	if string(out) != "OK\n" {
    		t.Errorf("%s", string(out))
    	}
    	if err != nil {
    		t.Errorf("%s", err)
    	}
    }
    
    func mustHaveCxx(t *testing.T) {
    	// Ask the go tool for the CXX it's configured to use.
    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)
  9. doc/go1.17_spec.html

    </p>
    
    <pre>
    v, ok = x.(T)
    v, ok := x.(T)
    var v, ok = x.(T)
    var v, ok interface{} = x.(T) // dynamic types of v and ok are T and bool
    </pre>
    
    <p>
    yields an additional untyped boolean value. The value of <code>ok</code> is <code>true</code>
    if the assertion holds. Otherwise it is <code>false</code> and the value of <code>v</code> is
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
  10. src/bufio/bufio_test.go

    func BenchmarkReaderWriteToOptimal(b *testing.B) {
    	const bufSize = 16 << 10
    	buf := make([]byte, bufSize)
    	r := bytes.NewReader(buf)
    	srcReader := NewReaderSize(onlyReader{r}, 1<<10)
    	if _, ok := io.Discard.(io.ReaderFrom); !ok {
    		b.Fatal("io.Discard doesn't support ReaderFrom")
    	}
    	for i := 0; i < b.N; i++ {
    		r.Seek(0, io.SeekStart)
    		srcReader.Reset(onlyReader{r})
    		n, err := srcReader.WriteTo(io.Discard)
    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)
Back to top