Skip to content

Commit

Permalink
simplify test resources of acceptance module
Browse files Browse the repository at this point in the history
  • Loading branch information
tribbloid committed Sep 8, 2023
1 parent c8a4ae3 commit 62e7413
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions core/src/testFixtures/scala/splain/TestHelpers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ trait TestHelpers extends Suite {
val path = resourcePath(name, fname)

val resource = ClassLoader.getSystemClassLoader.getResource(path.toString)
require(resource != null, s"Cannot find resource: $path")

val actualPath = Paths.get(resource.toURI)

new String(Files.readAllBytes(actualPath))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ object Acceptance {

trait SpecBase extends AnyFunSpec with TestHelpers with static.FromCodeMixin {

val buffer: ArrayBuffer[TryCompile] = ArrayBuffer.empty
lazy val buffer: ArrayBuffer[TryCompile] = ArrayBuffer.empty

def check(v: TryCompile): Unit = {
buffer += v
Expand Down

0 comments on commit 62e7413

Please sign in to comment.