Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TestWalk (0.39 sec)

  1. src/path/filepath/path_test.go

    	}
    
    	return cdir
    }
    
    func TestWalk(t *testing.T) {
    	walk := func(root string, fn fs.WalkDirFunc) error {
    		return filepath.Walk(root, func(path string, info fs.FileInfo, err error) error {
    			return fn(path, fs.FileInfoToDirEntry(info), err)
    		})
    	}
    	testWalk(t, walk, 1)
    }
    
    func TestWalkDir(t *testing.T) {
    	testWalk(t, filepath.WalkDir, 2)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 16:38:19 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  2. src/cmd/go/internal/fsys/fsys_test.go

    			t.Errorf("IsDirWithGoFiles(%q): got %v, %v; want nil error", tc.dir, got, gotErr)
    		}
    		if got != tc.want {
    			t.Errorf("IsDirWithGoFiles(%q) = %v; want %v", tc.dir, got, tc.want)
    		}
    	}
    }
    
    func TestWalk(t *testing.T) {
    	// The root of the walk must be a name with an actual basename, not just ".".
    	// Walk uses Lstat to obtain the name of the root, and Lstat on platforms
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 18:52:11 UTC 2023
    - 29.1K bytes
    - Viewed (0)
Back to top