aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/kotlin/com/pitchedapps/frost/parsers/ParserTestHelper.kt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/test/kotlin/com/pitchedapps/frost/parsers/ParserTestHelper.kt')
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/parsers/ParserTestHelper.kt22
1 files changed, 0 insertions, 22 deletions
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/parsers/ParserTestHelper.kt b/app/src/test/kotlin/com/pitchedapps/frost/parsers/ParserTestHelper.kt
deleted file mode 100644
index 53495ecb..00000000
--- a/app/src/test/kotlin/com/pitchedapps/frost/parsers/ParserTestHelper.kt
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.pitchedapps.frost.parsers
-
-import java.net.URL
-import java.nio.file.Paths
-
-/**
- * Created by Allan Wang on 2017-10-06.
- */
-fun <T : Any> T.getResource(path: String): String? {
- Paths.get("src/test/resources/${path.trimStart('/')}")
- val resource: URL? = this::class.java.classLoader.getResource(path)
- if (resource == null) {
- println("Resource at $path could not be found")
- return null
- }
- return resource.readText()
-}
-
-fun <T : Any, P : Any> T.debug(path: String, parser: FrostParser<P>) {
- val content = getResource("priv/$path.html") ?: return
-// println(parser.debug(content))
-} \ No newline at end of file