summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2007-08-30 00:13:48 +0000
committerBurak Emir <emir@epfl.ch>2007-08-30 00:13:48 +0000
commit7896c668273de297728519afb6fb7d4afadb29e4 (patch)
tree587c9aca911be3346f02795e050f691b5754149f
parent57a9a56fa970e7fbf4818e4bf6b42e2ce9a5e2c5 (diff)
downloadscala-7896c668273de297728519afb6fb7d4afadb29e4.tar.gz
scala-7896c668273de297728519afb6fb7d4afadb29e4.tar.bz2
scala-7896c668273de297728519afb6fb7d4afadb29e4.zip
moved test cases in bug457.scala in to patmatne...
moved test cases in bug457.scala in to patmatnew.scala
-rw-r--r--test/files/run/bug457.check0
-rw-r--r--test/files/run/bug457.scala44
-rw-r--r--test/files/run/patmatnew.scala46
3 files changed, 45 insertions, 45 deletions
diff --git a/test/files/run/bug457.check b/test/files/run/bug457.check
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/files/run/bug457.check
+++ /dev/null
diff --git a/test/files/run/bug457.scala b/test/files/run/bug457.scala
deleted file mode 100644
index ae53ea8e1a..0000000000
--- a/test/files/run/bug457.scala
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-object Test {
-
- def method1() = {
- val x = "Hello, world";
- val y = 100;
-
- y match {
- case _: Int
- if (x match { case t => t.trim().length() > 0 }) =>
- false;
- case _ => true;
- }
- }
-
- def method2(): scala.Boolean = {
- val x: String = "Hello, world";
- val y: scala.Int = 100;
- {
- var temp1: scala.Int = y;
- var result: scala.Boolean = false;
- if (
- {
- var result1: scala.Boolean = true;
- if (y == 100)
- result1
- else
- throw new MatchError("crazybox.scala, line 11")
- } && (y > 90)
- )
- result
- else
- throw new MatchError("crazybox.scala, line 9")
- }
- }
-
- def main(args: Array[String]): Unit = {
- method1();
- method2();
- }
-
-}
-
diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala
index 7c283fae5c..fdb01c9aec 100644
--- a/test/files/run/patmatnew.scala
+++ b/test/files/run/patmatnew.scala
@@ -36,7 +36,8 @@ object Test extends TestConsoleMain {
new Test1093,
new Test1163_Order,
new TestUnbox,
- ClassDefInGuard
+ ClassDefInGuard,
+ Bug457
)
class Foo(j:Int) {
@@ -450,5 +451,48 @@ object Test extends TestConsoleMain {
}
}
+
+
+ object Bug457 extends TestCase("Bug457") {
+
+ def method1() = {
+ val x = "Hello, world";
+ val y = 100;
+
+ y match {
+ case _: Int if (x match { case t => t.trim().length() > 0 }) => false;
+ case _ => true;
+ }
+ }
+
+ def method2(): scala.Boolean = {
+ val x: String = "Hello, world";
+ val y: scala.Int = 100;
+ {
+ var temp1: scala.Int = y;
+ var result: scala.Boolean = false;
+ if (
+ {
+ var result1: scala.Boolean = true;
+ if (y == 100)
+ result1
+ else
+ throw new MatchError("crazybox.scala, line 11")
+ } && (y > 90)
+ )
+ result
+ else
+ throw new MatchError("crazybox.scala, line 9")
+ }
+ }
+
+ override def runTest {
+ method1();
+ method2();
+ }
+
+ }
+
+
}