From 41b3641aa89fa6121f6b89807d5a030b6f382d0c Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Thu, 23 Mar 2017 14:09:48 +0100 Subject: Add testing of new test framework --- tests/partest-test/negAnnotWrongLine.scala | 3 +++ tests/partest-test/negMissingAnnot.scala | 1 + tests/partest-test/negNoPositionAnnots.scala | 5 +++++ tests/partest-test/negTooManyAnnots.scala | 3 +++ tests/partest-test/posFail1Error.scala | 3 +++ tests/partest-test/runDiffOutput1.check | 5 +++++ tests/partest-test/runDiffOutput1.scala | 9 +++++++++ tests/partest-test/runWrongOutput1.check | 6 ++++++ tests/partest-test/runWrongOutput1.scala | 9 +++++++++ tests/partest-test/runWrongOutput2.check | 3 +++ tests/partest-test/runWrongOutput2.scala | 9 +++++++++ 11 files changed, 56 insertions(+) create mode 100644 tests/partest-test/negAnnotWrongLine.scala create mode 100644 tests/partest-test/negMissingAnnot.scala create mode 100644 tests/partest-test/negNoPositionAnnots.scala create mode 100644 tests/partest-test/negTooManyAnnots.scala create mode 100644 tests/partest-test/posFail1Error.scala create mode 100644 tests/partest-test/runDiffOutput1.check create mode 100644 tests/partest-test/runDiffOutput1.scala create mode 100644 tests/partest-test/runWrongOutput1.check create mode 100644 tests/partest-test/runWrongOutput1.scala create mode 100644 tests/partest-test/runWrongOutput2.check create mode 100644 tests/partest-test/runWrongOutput2.scala (limited to 'tests/partest-test') diff --git a/tests/partest-test/negAnnotWrongLine.scala b/tests/partest-test/negAnnotWrongLine.scala new file mode 100644 index 000000000..06ba0a2c3 --- /dev/null +++ b/tests/partest-test/negAnnotWrongLine.scala @@ -0,0 +1,3 @@ +object Foo { // error + def bar: Int = "LOL" +} diff --git a/tests/partest-test/negMissingAnnot.scala b/tests/partest-test/negMissingAnnot.scala new file mode 100644 index 000000000..acffb37a3 --- /dev/null +++ b/tests/partest-test/negMissingAnnot.scala @@ -0,0 +1 @@ +class Foo extends Bar diff --git a/tests/partest-test/negNoPositionAnnots.scala b/tests/partest-test/negNoPositionAnnots.scala new file mode 100644 index 000000000..7f3ce7e34 --- /dev/null +++ b/tests/partest-test/negNoPositionAnnots.scala @@ -0,0 +1,5 @@ +object Foo { + def bar: Int = "LOL" + + // nopos-error +} diff --git a/tests/partest-test/negTooManyAnnots.scala b/tests/partest-test/negTooManyAnnots.scala new file mode 100644 index 000000000..5dbd2fd75 --- /dev/null +++ b/tests/partest-test/negTooManyAnnots.scala @@ -0,0 +1,3 @@ +object Test { + def foo: Int = "LOL" // error // error +} diff --git a/tests/partest-test/posFail1Error.scala b/tests/partest-test/posFail1Error.scala new file mode 100644 index 000000000..c8b565498 --- /dev/null +++ b/tests/partest-test/posFail1Error.scala @@ -0,0 +1,3 @@ +object Test extends Bar { + def main(args: Array[String]): Unit = () +} diff --git a/tests/partest-test/runDiffOutput1.check b/tests/partest-test/runDiffOutput1.check new file mode 100644 index 000000000..6234030de --- /dev/null +++ b/tests/partest-test/runDiffOutput1.check @@ -0,0 +1,5 @@ +1 +2 +4 +4 +5 diff --git a/tests/partest-test/runDiffOutput1.scala b/tests/partest-test/runDiffOutput1.scala new file mode 100644 index 000000000..32cf6f5b6 --- /dev/null +++ b/tests/partest-test/runDiffOutput1.scala @@ -0,0 +1,9 @@ +object Test { + def main(args: Array[String]): Unit = { + println(1) + println(2) + println(3) + println(4) + println(5) + } +} diff --git a/tests/partest-test/runWrongOutput1.check b/tests/partest-test/runWrongOutput1.check new file mode 100644 index 000000000..b414108e8 --- /dev/null +++ b/tests/partest-test/runWrongOutput1.check @@ -0,0 +1,6 @@ +1 +2 +3 +4 +5 +6 diff --git a/tests/partest-test/runWrongOutput1.scala b/tests/partest-test/runWrongOutput1.scala new file mode 100644 index 000000000..32cf6f5b6 --- /dev/null +++ b/tests/partest-test/runWrongOutput1.scala @@ -0,0 +1,9 @@ +object Test { + def main(args: Array[String]): Unit = { + println(1) + println(2) + println(3) + println(4) + println(5) + } +} diff --git a/tests/partest-test/runWrongOutput2.check b/tests/partest-test/runWrongOutput2.check new file mode 100644 index 000000000..01e79c32a --- /dev/null +++ b/tests/partest-test/runWrongOutput2.check @@ -0,0 +1,3 @@ +1 +2 +3 diff --git a/tests/partest-test/runWrongOutput2.scala b/tests/partest-test/runWrongOutput2.scala new file mode 100644 index 000000000..32cf6f5b6 --- /dev/null +++ b/tests/partest-test/runWrongOutput2.scala @@ -0,0 +1,9 @@ +object Test { + def main(args: Array[String]): Unit = { + println(1) + println(2) + println(3) + println(4) + println(5) + } +} -- cgit v1.2.3