- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for testOf (0.17 sec)
-
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) -
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) -
src/cmd/asm/internal/asm/operand_test.go
func testBadOperandParser(t *testing.T, parser *Parser, tests []badOperandTest) { 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) -
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) -
src/archive/zip/writer_test.go
if err != nil { t.Fatal(err) } for i, test := range utf8Tests { flags := r.File[i].Flags if flags != test.flags { t.Errorf("CreateHeader(name=%q comment=%q nonUTF8=%v): flags=%#x, want %#x", test.name, test.comment, test.nonUTF8, flags, test.flags) } } } func TestWriterTime(t *testing.T) { var buf bytes.Buffer h := &FileHeader{ Name: "test.txt",
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) -
src/bytes/example_test.go
// Copyright 2011 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 bytes_test import ( "bytes" "encoding/base64" "fmt" "io" "os" "sort" "strconv" "unicode" ) func ExampleBuffer() { var b bytes.Buffer // A Buffer needs no initialization. b.Write([]byte("Hello ")) fmt.Fprintf(&b, "world!")
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1) -
src/archive/zip/zip_test.go
}, } // write a zip file buf := new(bytes.Buffer) w := NewWriter(buf) for _, test := range headerTests { h := &FileHeader{ Name: test.name, Extra: test.extra, } _, err := w.CreateHeader(h) if err != test.wanterr { t.Errorf("error=%v, want %v", err, test.wanterr) } } if err := w.Close(); err != nil { t.Fatal(err) } }
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) -
src/archive/tar/tar_test.go
if formats != v.formats { t.Errorf("test %d, allowedFormats(): got %v, want %v", i, formats, v.formats) } if formats&FormatPAX > 0 && !reflect.DeepEqual(paxHdrs, v.paxHdrs) && !(len(paxHdrs) == 0 && len(v.paxHdrs) == 0) { t.Errorf("test %d, allowedFormats():\ngot %v\nwant %s", i, paxHdrs, v.paxHdrs) } if (formats != FormatUnknown) && (err != nil) { t.Errorf("test %d, unexpected error: %v", i, 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) -
src/archive/tar/writer_test.go
} if len(f.ops) > 0 { t.Errorf("test %d, expected %d more operations", i, len(f.ops)) } case testClose: err := tw.Close() if !equalError(err, tf.wantErr) { t.Fatalf("test %d, Close() = %v, want %v", i, err, tf.wantErr) } default: t.Fatalf("test %d, unknown test operation: %T", i, tf) } } if v.file != "" {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Feb 27 16:39:23 GMT 2024 - 38.7K bytes - Viewed (0) -
src/cmd/api/main_test.go
// // Since the set of packages that exist depends on context, the result of // loadImports also depends on context. However, to improve test running time // the configuration for each environment is cached across runs. func (w *Walker) loadImports() { if w.context == nil { return // test-only Walker; does not use the import map } name := contextName(w.context) imports, ok := listCache.Load(name) if !ok {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Apr 09 20:48:51 GMT 2024 - 31.4K bytes - Viewed (0)