File tree Expand file tree Collapse file tree 5 files changed +41
-5
lines changed Expand file tree Collapse file tree 5 files changed +41
-5
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ scalaModuleSettings
44
55name := " scala-swing"
66
7- version := " 2.0.2 -SNAPSHOT"
7+ version := " 2.0.3 -SNAPSHOT"
88
99scalacOptions ++= Seq (" -deprecation" , " -feature" )
1010
@@ -20,7 +20,13 @@ mimaPreviousVersion := Some("2.0.0")
2020// set the prompt (for this build) to include the project id.
2121shellPrompt in ThisBuild := { state => Project .extract(state).currentRef.project + " > " }
2222
23- lazy val swing = project.in( file(" ." ) )
23+ lazy val swing = project.in(file(" ." ))
24+ .settings(
25+ libraryDependencies += {
26+ val v = if (scalaVersion.value == " 2.13.0-M3" ) " 3.0.5-M1" else " 3.0.5"
27+ " org.scalatest" %% " scalatest" % v % " test"
28+ }
29+ )
2430
2531lazy val examples = project.in( file(" examples" ) )
2632 .dependsOn(swing)
Original file line number Diff line number Diff line change 1- sbt.version =0.13.17
1+ sbt.version =0.13.17
Original file line number Diff line number Diff line change 1- addSbtPlugin(" org.scala-lang.modules" % " sbt-scala-module" % " 1.0.13 " )
1+ addSbtPlugin(" org.scala-lang.modules" % " sbt-scala-module" % " 1.0.14 " )
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ object Dialog {
121121 object Result extends Enumeration {
122122 import JOptionPane ._
123123 val Yes : Result .Value = Value (YES_OPTION )
124- val Ok : Result .Value = Value ( OK_OPTION )
124+ val Ok : Result .Value = Yes // N.B. Do not use ` Value` because id 0 is already used
125125 val No : Result .Value = Value (NO_OPTION )
126126 val Cancel : Result .Value = Value (CANCEL_OPTION )
127127 val Closed : Result .Value = Value (CLOSED_OPTION )
Original file line number Diff line number Diff line change 1+ package scala .swing
2+
3+ import org .scalatest .{FlatSpec , Matchers }
4+
5+ class Issue73 extends FlatSpec with Matchers {
6+ " Enumerations" should " not contain duplicate ids" in {
7+ // the initializers of any of these will through an
8+ // assertion error if an enumeration `Value` id is used twice.
9+ Alignment
10+ BorderPanel .Position
11+ Dialog .Message
12+ Dialog .Options
13+ Dialog .Result
14+ FileChooser .Result
15+ FileChooser .SelectionMode
16+ FlowPanel .Alignment
17+ FormattedTextField .FocusLostBehavior
18+ GridBagPanel .Anchor
19+ GridBagPanel .Fill
20+ ListView .IntervalMode
21+ Orientation
22+ ScrollPane .BarPolicy
23+ TabbedPane .Layout
24+ Table .AutoResizeMode
25+ Table .ElementMode
26+ Table .IntervalMode
27+ event.Key
28+ event.Key .Location
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments