diff options
Diffstat (limited to 'test/src/TestAPI.kt')
-rw-r--r-- | test/src/TestAPI.kt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/src/TestAPI.kt b/test/src/TestAPI.kt index 95fe655e..d47770f8 100644 --- a/test/src/TestAPI.kt +++ b/test/src/TestAPI.kt @@ -99,8 +99,12 @@ fun ContentNode.toTestString(): String { }.toString() } -val tempLocation = Location(File("/tmp/out")) +class InMemoryLocation(override val path: String): Location { + override fun relativePathTo(other: Location, extension: String): String = other.path +} object InMemoryLocationService: LocationService { - override fun location(node: DocumentationNode) = tempLocation; + override fun location(node: DocumentationNode) = InMemoryLocation(relativePathToNode(node)); } + +val tempLocation = InMemoryLocation("") |