aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/testing/testing.go b/src/testing/testing.go
index aa1584f2d9..608bb39671 100644
--- a/src/testing/testing.go
+++ b/src/testing/testing.go
@@ -822,11 +822,10 @@ var tempDirReplacer struct {
}
// TempDir returns a temporary directory for the test to use.
-// It is lazily created on first access, and calls t.Fatal if the directory
-// creation fails.
-// Subsequent calls to t.TempDir return the same directory.
// The directory is automatically removed by Cleanup when the test and
// all its subtests complete.
+// Each subsequent call to t.TempDir returns a unique directory;
+// if the directory creation fails, TempDir terminates the test by calling Fatal.
func (c *common) TempDir() string {
// Use a single parent directory for all the temporary directories
// created by a test, each numbered sequentially.