We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e78f001 commit 13558f1Copy full SHA for 13558f1
src/test/scala/ptp_compiler/CompilerSpec.scala
@@ -0,0 +1,16 @@
1
+package ptp_compiler
2
+
3
+import org.scalatest.flatspec.AnyFlatSpec
4
+import scala.io.Source
5
+import tools.compiler.Compiler
6
+import testingtools.FileHandler.compareFile
7
+import org.scalatest.matchers.should._
8
9
+class OCRCompilerIntegrationSpec extends AnyFlatSpec with Matchers {
10
11
+ "print-string.ocr" should "compile to print-string.ptb" in {
12
+ val sourceFilename = "examples/ocr/pseudocode/print-string.ocr"
13
+ val compiler = new Compiler(Source.fromFile(sourceFilename).getLines().mkString)
14
+ assert(compareFile(compiler.compile, "examples/ocr/bytecode/print-string.ptb"))
15
+ }
16
+}
0 commit comments