Skip to content

Commit

Permalink
add another test for windows backslashs
Browse files Browse the repository at this point in the history
  • Loading branch information
haaase committed Jul 4, 2023
1 parent 53dd7c3 commit 3756676
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/resources/importstest.viper
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// imports
import "deps/calendar_header.vpr"
// sources

// derived

// invariants


// interactions

14 changes: 14 additions & 0 deletions src/test/scala/ViperBackendTests.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package lore
import munit.FunSuite
import lore.AST.*
import lore.backends.ViperBackend

class ViperBackendSuite extends FunSuite:
test("Imports"):
import java.nio.file.{Path}
import java.nio.charset.StandardCharsets

val compiled = ViperBackend.compileAsSingleFile(List(TViperImport(Path.of("deps/calendar_header.vpr"))))
val expectation = String(getClass.getClassLoader.getResourceAsStream("importstest.viper").readAllBytes, StandardCharsets.UTF_8)

assertEquals(compiled, expectation)

0 comments on commit 3756676

Please sign in to comment.