From f326b30511d9a043e1905b576ff46898b39ac4fc Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Wed, 11 Dec 2024 12:41:44 +0100 Subject: [PATCH] Remove never executed test case --- project/Build.scala | 1 - .../tools/tasty/BuildTastyVersionTest.scala | 39 ------------------- 2 files changed, 40 deletions(-) diff --git a/project/Build.scala b/project/Build.scala index 8bf53f8cb5b6..e461240fde11 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -2447,7 +2447,6 @@ object Build { versionScheme := Some("semver-spec"), Test / envVars ++= Map( "EXPECTED_TASTY_VERSION" -> expectedTastyVersion, - "BASE_VERSION" -> baseVersion ), if (mode == Bootstrapped) Def.settings( commonMiMaSettings, diff --git a/tasty/test/dotty/tools/tasty/BuildTastyVersionTest.scala b/tasty/test/dotty/tools/tasty/BuildTastyVersionTest.scala index b6a54ef45d68..d2e62e1f9eb0 100644 --- a/tasty/test/dotty/tools/tasty/BuildTastyVersionTest.scala +++ b/tasty/test/dotty/tools/tasty/BuildTastyVersionTest.scala @@ -12,7 +12,6 @@ class BuildTastyVersionTest { // Needs to be defined in build Test/envVars val ExpectedTastyVersionEnvVar = "EXPECTED_TASTY_VERSION" - val BaseVersionEnvVar = "BASE_VERSION" @Test def testBuildTastyVersion(): Unit = { val expectedVersion = sys.env.get(ExpectedTastyVersionEnvVar) @@ -24,42 +23,4 @@ class BuildTastyVersionTest { } assertEquals(CurrentTastyVersion, expectedVersion) } - - // Tested only in nightly / release builds - // Protects from publishing artifacts with incorrect TASTY version - @Test def testReleasedTastyVersion(): Unit = { - lazy val (minor, patch, isRC) = sys.env.get(BaseVersionEnvVar) - .getOrElse(fail(s"Env variable $BaseVersionEnvVar not defined")) - .match { - case s"3.$minor.$patch-${_}" => (minor.toInt, patch.toInt, true) - case s"3.$minor.$patch" => (minor.toInt, patch.toInt, false) - case other => fail(s"Invalid Scala base version string: $other") - } - - if sys.env.get("NIGHTLYBUILD").contains("yes") then { - assertTrue( - "TASTY needs to be experimental in nightly builds", - CurrentTastyVersion.isExperimental - ) - assertEquals( - CurrentTastyVersion.minor, - if patch == 0 then minor else (minor + 1) - ) - } else if sys.env.get("RELEASEBUILD").contains("yes") then { - assertEquals( - "Minor versions of TASTY vesion and Scala version should match in stable release", - CurrentTastyVersion.minor, minor - ) - if isRC then - assertEquals( - "TASTy should be experimental when releasing a new minor version RC", - CurrentTastyVersion.isExperimental, patch == 0 - ) - else - assertFalse( - "Stable version cannot use experimental TASTY", - CurrentTastyVersion.isExperimental - ) - } - } }