From 6890f382baec625e01c3850243d826645c60dbe6 Mon Sep 17 00:00:00 2001 From: Heejong Lee Date: Tue, 30 Apr 2013 20:42:58 +0900 Subject: SI-7432 add testcases --- test/files/run/range.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/files/run/range.scala b/test/files/run/range.scala index f08b2105d3..b81e67921a 100644 --- a/test/files/run/range.scala +++ b/test/files/run/range.scala @@ -16,6 +16,17 @@ object Test { catch { case _: IllegalArgumentException => true } ) assert(caught) + // #7432 + val noElemAtMin = ( + try { (10 until 10).min ; false } + catch { case _: NoSuchElementException => true } + ) + assert(noElemAtMin) + val noElemAtMax = ( + try { (10 until 10).max ; false } + catch { case _: NoSuchElementException => true } + ) + assert(noElemAtMax) } case class GR[T](val x: T)(implicit val num: Integral[T]) { -- cgit v1.2.3