aboutsummaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-19 18:59:00 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-19 18:59:00 +0100
commitd9bfa029b0ecf300ae47cf1033db2d5cb323d705 (patch)
treeff8a9f7d4b0b1233d3d7b1e89a74047c64c8dbd7 /test/src
parent2822a3eee07a27495d5af4fc36304d483756d3a6 (diff)
downloaddokka-d9bfa029b0ecf300ae47cf1033db2d5cb323d705.tar.gz
dokka-d9bfa029b0ecf300ae47cf1033db2d5cb323d705.tar.bz2
dokka-d9bfa029b0ecf300ae47cf1033db2d5cb323d705.zip
remove dependency of Location on a File; use more meaningful locations in tests
Diffstat (limited to 'test/src')
-rw-r--r--test/src/TestAPI.kt8
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("")