From 9bbf466c4b681d74d0c229d8810a522fc59a9c8b Mon Sep 17 00:00:00 2001 From: Albert Meltzer <7529386+kitbellew@users.noreply.github.com> Date: Thu, 26 Sep 2024 12:59:55 -0700 Subject: [PATCH] CommunitySuite: add tests for scala2 versions --- .../community/CommunityScala2Suite.scala | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 scalafmt-tests-community/src/test/scala/org/scalafmt/community/CommunityScala2Suite.scala diff --git a/scalafmt-tests-community/src/test/scala/org/scalafmt/community/CommunityScala2Suite.scala b/scalafmt-tests-community/src/test/scala/org/scalafmt/community/CommunityScala2Suite.scala new file mode 100644 index 0000000000..3e3effec25 --- /dev/null +++ b/scalafmt-tests-community/src/test/scala/org/scalafmt/community/CommunityScala2Suite.scala @@ -0,0 +1,42 @@ +package org.scalafmt.community + +import scala.meta._ + +abstract class CommunityScala2Suite extends CommunitySuite { + + protected def getBuild( + name: String, + ref: String, + dialect: sourcecode.Text[Dialect], + files: Int, + ): CommunityBuild = CommunityBuild( + "https://github.com/scala/scala.git", + ref, + name, + Nil, + files, + dialect, + ) + +} + +class CommunityScala2_11Suite extends CommunityScala2Suite { + + override protected def builds = + Seq(getBuild("scala-2.11", "v2.11.12", dialects.Scala211, 1286)) + +} + +class CommunityScala2_12Suite extends CommunityScala2Suite { + + override protected def builds = + Seq(getBuild("scala-2.12", "v2.12.20", dialects.Scala212, 1277)) + +} + +class CommunityScala2_13Suite extends CommunityScala2Suite { + + override protected def builds = + Seq(getBuild("scala-2.13", "v2.13.14", dialects.Scala213, 1287)) + +}