Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,593 for testfs (0.18 sec)

  1. doc/next/6-stdlib/99-minor/testing/fstest/63675.md

    [TestFS] now returns a structured error that can be unwrapped
    (via method `Unwrap() []error`). This allows inspecting errors
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 12 20:57:18 UTC 2024
    - 159 bytes
    - Viewed (0)
  2. src/testing/fstest/testfs_test.go

    	if err := os.Symlink(filepath.Join(tmp, "hello"), filepath.Join(tmp, "hello.link")); err != nil {
    		t.Fatal(err)
    	}
    
    	if err := TestFS(tmpfs, "hello", "hello.link"); err != nil {
    		t.Fatal(err)
    	}
    }
    
    func TestDash(t *testing.T) {
    	m := MapFS{
    		"a-b/a": {Data: []byte("a-b/a")},
    	}
    	if err := TestFS(m, "a-b/a"); err != nil {
    		t.Error(err)
    	}
    }
    
    type shuffledFS MapFS
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  3. src/io/fs/readdir_test.go

    	}
    
    	for _, test := range tests {
    		test := test
    		t.Run(test.path, func(t *testing.T) {
    			fi, err := Stat(testFs, test.path)
    			if err != nil {
    				t.Fatal(err)
    			}
    
    			dirEntry := FileInfoToDirEntry(fi)
    			if g, w := dirEntry.Type(), test.wantMode; g != w {
    				t.Errorf("FileMode mismatch: got=%v, want=%v", g, w)
    			}
    			if g, w := dirEntry.Name(), test.path; g != w {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 27 16:25:41 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  4. src/slices/sort_test.go

    	// should propagate the NaN to their output.
    	for i := 0; i < len(fs); i++ {
    		testfs := Clone(fs)
    		testfs[i] = math.NaN()
    
    		fmin := Min(testfs)
    		if !math.IsNaN(fmin) {
    			t.Errorf("got min %v, want NaN", fmin)
    		}
    
    		fmax := Max(testfs)
    		if !math.IsNaN(fmax) {
    			t.Errorf("got max %v, want NaN", fmax)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 19:20:55 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  5. src/testing/fstest/mapfs_test.go

    )
    
    func TestMapFS(t *testing.T) {
    	m := MapFS{
    		"hello":             {Data: []byte("hello, world\n")},
    		"fortune/k/ken.txt": {Data: []byte("If a program is too slow, it must have a loop.\n")},
    	}
    	if err := TestFS(m, "hello", "fortune", "fortune/k", "fortune/k/ken.txt"); err != nil {
    		t.Fatal(err)
    	}
    }
    
    func TestMapFSChmodDot(t *testing.T) {
    	m := MapFS{
    		"a/b.txt": &MapFile{Mode: 0666},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 14:59:55 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  6. src/embed/internal/embedtest/embed_test.go

    	}
    }
    
    // Tests for issue 49514.
    var _ = '"'
    var _ = '\''
    var _ = '🦆'
    
    func TestGlobal(t *testing.T) {
    	testFiles(t, global, "concurrency.txt", "Concurrency is not parallelism.\n")
    	testFiles(t, global, "testdata/hello.txt", "hello, world\n")
    	testFiles(t, global, "testdata/glass.txt", "I can eat glass and it doesn't hurt me.\n")
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 20:10:16 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  7. src/io/fs/fs.go

    		}
    		w++
    	}
    	return string(buf[:w])
    }
    
    // IsDir reports whether m describes a directory.
    // That is, it tests for the [ModeDir] bit being set in m.
    func (m FileMode) IsDir() bool {
    	return m&ModeDir != 0
    }
    
    // IsRegular reports whether m describes a regular file.
    // That is, it tests that no mode type bits are set.
    func (m FileMode) IsRegular() bool {
    	return m&ModeType == 0
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 15 21:21:41 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  8. test/uintptrescapes2.go

    //go:uintptrescapes
    func (T) M2(a ...uintptr) {} // ERROR "escaping ...uintptr"
    
    func TestF1() {
    	var t int                        // ERROR "moved to heap"
    	F1(uintptr(unsafe.Pointer(&t)))  // ERROR "live at call to F1: .?autotmp" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
    }
    
    func TestF3() {
    	var t2 int                       // ERROR "moved to heap"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 24 18:24:24 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  9. .github/workflows/tests.yml

            with:
              path: ~/go/pkg/mod
              key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
    
          - name: Tests
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 09:24:34 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  10. tests/integration/tests.mk

    # Generate integration test targets for kubernetes environment.
    test.integration.%.kube: | $(JUNIT_REPORT) check-go-tag
    	$(call run-test,./tests/integration/$(subst .,/,$*)/...)
    
    # Generate integration fuzz test targets for kubernetes environment.
    test.integration-fuzz.%.kube: | $(JUNIT_REPORT) check-go-tag
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 10 20:33:28 UTC 2024
    - 5.2K bytes
    - Viewed (0)
Back to top