Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for testdata (0.19 sec)

  1. src/cmd/api/api_test.go

    	}
    
    	testenv.MustHaveGoBuild(t)
    
    	td, err := os.Open("testdata/src/pkg")
    	if err != nil {
    		t.Fatal(err)
    	}
    	fis, err := td.Readdir(0)
    	if err != nil {
    		t.Fatal(err)
    	}
    	for _, fi := range fis {
    		if !fi.IsDir() {
    			continue
    		}
    
    		// TODO(gri) remove extra pkg directory eventually
    		goldenFile := filepath.Join("testdata", "src", "pkg", fi.Name(), "golden.txt")
    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)
  2. src/archive/zip/reader_test.go

    		file    string
    		want    []string
    		wantErr bool
    	}{
    		{
    			file: "testdata/unix.zip",
    			want: []string{".", "dir", "dir/bar", "dir/empty", "hello", "readonly"},
    		},
    		{
    			file: "testdata/subdir.zip",
    			want: []string{".", "a", "a/b", "a/b/c"},
    		},
    		{
    			file:    "testdata/dupdir.zip",
    			wantErr: true,
    		},
    	} {
    		test := test
    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)
  3. src/archive/tar/writer_test.go

    				},
    			}, {
    				file: "testdata/pax-nil-sparse-data.tar",
    				tests: []testFnc{
    					testHeader{Header{
    						Typeflag:    TypeReg,
    						Name:        "sparse.db",
    						Size:        1000,
    						SparseHoles: []sparseEntry{{Offset: 1000, Length: 0}},
    					}, nil},
    					testWrite{strings.Repeat("0123456789", 100), 1000, nil},
    					testClose{},
    				},
    			}, {
    				file: "testdata/pax-nil-sparse-hole.tar",
    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)
  4. misc/go_android_exec/main.go

    	return importPath, isStd, modPath, modDir, nil
    }
    
    // adbCopyTree copies testdata, go.mod, go.sum files from subdir
    // and from parent directories all the way up to the root of subdir.
    // go.mod and go.sum files are needed for the go tool modules queries,
    // and the testdata directories for tests.  It is common for tests to
    // reach out into testdata from parent packages.
    func adbCopyTree(deviceCwd, subdir string) error {
    	dir := ""
    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)
  5. src/archive/zip/writer_test.go

    		t.Fatalf("unexpected CreateHeader error: %v", err)
    	}
    	if err := w.Close(); err != nil {
    		t.Fatalf("unexpected Close error: %v", err)
    	}
    
    	want, err := os.ReadFile("testdata/time-go.zip")
    	if err != nil {
    		t.Fatalf("unexpected ReadFile error: %v", err)
    	}
    	if got := buf.Bytes(); !bytes.Equal(got, want) {
    		fmt.Printf("%x\n%x\n", got, want)
    		t.Error("contents of time-go.zip differ")
    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)
  6. src/cmd/asm/internal/asm/endtoend_test.go

    var fileLineRE = regexp.MustCompile(`(?:^|\()(testdata[/\\][\da-z]+\.s:\d+)(?:$|\)|:)`)
    
    // Same as in test/run.go
    var (
    	errRE       = regexp.MustCompile(`// ERROR ?(.*)`)
    	errQuotesRE = regexp.MustCompile(`"([^"]*)"`)
    )
    
    func testErrors(t *testing.T, goarch, file string, flags ...string) {
    	input := filepath.Join("testdata", file+".s")
    	architecture, ctxt := setArch(goarch)
    	architecture.Init(ctxt)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Dec 07 18:42:59 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  7. src/archive/tar/tar_test.go

    	}
    }
    
    func TestFileInfoHeaderDir(t *testing.T) {
    	fi, err := os.Stat("testdata")
    	if err != nil {
    		t.Fatal(err)
    	}
    	h, err := FileInfoHeader(fi, "")
    	if err != nil {
    		t.Fatalf("FileInfoHeader: %v", err)
    	}
    	if g, e := h.Name, "testdata/"; g != e {
    		t.Errorf("Name = %q; want %q", g, e)
    	}
    	// Ignoring c_ISGID for golang.org/issue/4867
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 24K bytes
    - Viewed (0)
  8. doc/go1.17_spec.html

    If the iteration variables are declared outside the "for" statement,
    after execution their values will be those of the last iteration.
    </p>
    
    <pre>
    var testdata *struct {
    	a *[7]int
    }
    for i, _ := range testdata.a {
    	// testdata.a is never evaluated; len(testdata.a) is constant
    	// i ranges from 0 to 6
    	f(i)
    }
    
    var a [10]string
    for i, s := range a {
    	// type of i is int
    	// type of s is string
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
  9. src/cmd/asm/internal/asm/pseudo_test.go

    		{"PCDATA", "1", "expect two operands for PCDATA"},
    	}
    
    	runtimeTests := []errtest{
    		{"TEXT", "foo<ABIInternal>(SB),0", "TEXT \"foo\": ABIInternal requires NOSPLIT"},
    	}
    
    	testcats := []struct {
    		allowABI bool
    		tests    []errtest
    	}{
    		{
    			allowABI: false,
    			tests:    nonRuntimeTests,
    		},
    		{
    			allowABI: true,
    			tests:    runtimeTests,
    		},
    	}
    
    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)
  10. doc/go_spec.html

    as in an <a href="#Assignment_statements">assignment statement</a>.
    </p>
    
    <pre>
    var testdata *struct {
    	a *[7]int
    }
    for i, _ := range testdata.a {
    	// testdata.a is never evaluated; len(testdata.a) is constant
    	// i ranges from 0 to 6
    	f(i)
    }
    
    var a [10]string
    for i, s := range a {
    	// type of i is int
    	// type of s is string
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu May 02 22:43:51 GMT 2024
    - 279.6K bytes
    - Viewed (0)
Back to top