Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b295312 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Remove unused testWritablePath and associated methods"

parents f5f1ecb7 3eb9dfe1
Loading
Loading
Loading
Loading
+0 −27
Original line number Diff line number Diff line
@@ -1313,12 +1313,6 @@ func (p testPath) String() string {
	return p.path
}

type testWritablePath struct {
	testPath
}

func (p testPath) writablePath() {}

// PathForTesting returns a Path constructed from joining the elements of paths with '/'.  It should only be used from
// within tests.
func PathForTesting(paths ...string) Path {
@@ -1339,27 +1333,6 @@ func PathsForTesting(strs ...string) Paths {
	return p
}

// WritablePathForTesting returns a Path constructed from joining the elements of paths with '/'.  It should only be
// used from within tests.
func WritablePathForTesting(paths ...string) WritablePath {
	p, err := validateSafePath(paths...)
	if err != nil {
		panic(err)
	}
	return testWritablePath{testPath{basePath{path: p, rel: p}}}
}

// WritablePathsForTesting returns a Path constructed from each element in strs. It should only be used from within
// tests.
func WritablePathsForTesting(strs ...string) WritablePaths {
	p := make(WritablePaths, len(strs))
	for i, s := range strs {
		p[i] = WritablePathForTesting(s)
	}

	return p
}

type testPathContext struct {
	config Config
}