Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 50 for Errorf (0.15 sec)

  1. src/bytes/buffer_test.go

    	if err != nil {
    		t.Errorf("read error: %v", err)
    	}
    	if n != 0 {
    		t.Errorf("wrong count; got %d want 0", n)
    	}
    }
    
    func TestUnreadByte(t *testing.T) {
    	b := new(Buffer)
    
    	// check at EOF
    	if err := b.UnreadByte(); err == nil {
    		t.Fatal("UnreadByte at EOF: got no error")
    	}
    	if _, err := b.ReadByte(); err == nil {
    		t.Fatal("ReadByte at EOF: got no error")
    	}
    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)
  2. src/archive/tar/strconv_test.go

    		var p parser
    		got := p.parseNumeric([]byte(v.in))
    		ok := (p.err == nil)
    		if ok != v.ok {
    			if v.ok {
    				t.Errorf("parseNumeric(%q): got parsing failure, want success", v.in)
    			} else {
    				t.Errorf("parseNumeric(%q): got parsing success, want failure", v.in)
    			}
    		}
    		if ok && got != v.want {
    			t.Errorf("parseNumeric(%q): got %d, want %d", v.in, got, v.want)
    		}
    	}
    }
    
    func TestFormatNumeric(t *testing.T) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Feb 09 05:28:50 GMT 2021
    - 14K bytes
    - Viewed (0)
  3. src/cmd/asm/internal/asm/parse.go

    			p.errorf("register list: expected ']', found EOF")
    		} else {
    			p.errorf("register list: bad low register in `[%s`", loName)
    		}
    		return
    	}
    	if tok := p.next().ScanToken; tok != '-' {
    		p.errorf("register list: expected '-' after `[%s`, found %s", loName, tok)
    		return
    	}
    	hiName := p.next().String()
    	hi, ok := p.arch.Register[hiName]
    	if !ok {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Feb 21 14:34:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
  4. src/archive/zip/writer_test.go

    		got := r.File[i]
    		if got.Name != want.name {
    			t.Errorf("got Name %s; want %s", got.Name, want.name)
    		}
    		if got.Method != want.method {
    			t.Errorf("%s: got Method %#x; want %#x", want.name, got.Method, want.method)
    		}
    		if got.Flags != want.flags {
    			t.Errorf("%s: got Flags %#x; want %#x", want.name, got.Flags, want.flags)
    		}
    		if got.CRC32 != want.crc32 {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Sep 15 19:04:06 GMT 2023
    - 14.1K bytes
    - Viewed (0)
  5. src/archive/tar/reader_test.go

    			t.Errorf("test %d, readGNUSparsePAXHeaders(): got %v, want %v", i, got, v.wantMap)
    		}
    		if err != v.wantErr {
    			t.Errorf("test %d, readGNUSparsePAXHeaders() = %v, want %v", i, err, v.wantErr)
    		}
    		if hdr.Size != v.wantSize {
    			t.Errorf("test %d, Header.Size = %d, want %d", i, hdr.Size, v.wantSize)
    		}
    		if hdr.Name != v.wantName {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Nov 21 21:14:38 GMT 2022
    - 47.1K bytes
    - Viewed (0)
  6. src/archive/zip/zip_test.go

    		t.Errorf("UncompressedSize: got %d, want %d\n", got, want)
    	}
    	if got, want := fh2.UncompressedSize64, wantUncompressedSize64; got != want {
    		t.Errorf("UncompressedSize64: got %d, want %d\n", got, want)
    	}
    	if got, want := fh2.ModifiedTime, fh.ModifiedTime; got != want {
    		t.Errorf("ModifiedTime: got %d, want %d\n", got, want)
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  7. src/cmd/asm/internal/asm/operand_test.go

    			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) {
    	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/archive/tar/tar_test.go

    						if err := tw.WriteHeader(file.hdr); err != nil {
    							b.Errorf("unexpected WriteHeader error: %v", err)
    						}
    						if _, err := tw.Write(file.body); err != nil {
    							b.Errorf("unexpected Write error: %v", err)
    						}
    					}
    					if err := tw.Close(); err != nil {
    						b.Errorf("unexpected Close error: %v", err)
    					}
    				}
    			})
    		}
    	})
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 24K bytes
    - Viewed (0)
  9. src/bufio/scan_test.go

    			if got != words[wordCount] {
    				t.Errorf("#%d: %d: expected %q got %q", n, wordCount, words[wordCount], got)
    			}
    		}
    		if s.Scan() {
    			t.Errorf("#%d: scan ran too long, got %q", n, s.Text())
    		}
    		if wordCount != len(words) {
    			t.Errorf("#%d: termination expected at %d; got %d", n, len(words), wordCount)
    		}
    		err := s.Err()
    		if err != nil {
    			t.Errorf("#%d: %v", n, err)
    		}
    	}
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Sep 22 16:22:42 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  10. misc/go_android_exec/main.go

    		}
    		return errorf("%v: %w", cmd, err)
    	}
    
    	parts := strings.SplitN(string(bytes.TrimSpace(out)), ":", 4)
    	if len(parts) < 2 {
    		return errorf("%v: missing ':' in output: %q", cmd, out)
    	}
    	importPath = parts[0]
    	if importPath == "" || importPath == "." {
    		return errorf("current directory does not have a Go import path")
    	}
    	isStd, err = strconv.ParseBool(parts[1])
    	if err != nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Aug 21 17:46:57 GMT 2023
    - 15.3K bytes
    - Viewed (0)
Back to top