From 6965b470d433f501203c4e3d77b0919f826691ba Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Fri, 22 May 2015 16:07:23 +0200 Subject: Enable 440 run tests that pass. Note that some of them may pass due to several bugs that interfere. --- tests/run/t6633.scala | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/run/t6633.scala (limited to 'tests/run/t6633.scala') diff --git a/tests/run/t6633.scala b/tests/run/t6633.scala new file mode 100644 index 000000000..852fc5714 --- /dev/null +++ b/tests/run/t6633.scala @@ -0,0 +1,33 @@ +object Test extends dotty.runtime.LegacyApp { + import collection.mutable.ListBuffer + + def newLB = ListBuffer('a, 'b, 'c, 'd, 'e) + + val lb0 = newLB + + try { + lb0.insert(9, 'x) + } catch { + case ex: IndexOutOfBoundsException => println(ex) + } + + val lb1 = newLB + + try { + lb1.insert(9, 'x) + } catch { + case ex: IndexOutOfBoundsException => + } + + val replStr = scala.runtime.ScalaRunTime.replStringOf(lb1, 100) + if (replStr == "ListBuffer('a, 'b, 'c, 'd, 'e)\n") + println("replStringOf OK") + else + println("replStringOf FAILED: " + replStr) + + val len = lb1.length + if (len == 5) + println("length OK") + else + println("length FAILED: " + len) +} -- cgit v1.2.3