From f187bde1fde0e48960b39242db0d42573f1e363b Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Thu, 2 Jul 2015 15:38:15 -0700 Subject: SI-9377 ScalaVersion init no longer fails if versionless If the version string was empty, ScalaVersion would indignantly refuse to initialize. Now it takes a missing property as "none". --- test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala b/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala index acbf39fe23..a10e395011 100644 --- a/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala +++ b/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala @@ -57,4 +57,9 @@ class ScalaVersionTest { assertThrows[NumberFormatException] { ScalaVersion("2-.") } // scalacheck territory assertThrows[NumberFormatException] { ScalaVersion("any.7") } } + + // SI-9377 + @Test def `missing version is as good as none`() { + assertEquals(NoScalaVersion, ScalaVersion("")) + } } -- cgit v1.2.3