File tree 5 files changed +41
-5
lines changed
5 files changed +41
-5
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ scalaModuleSettings
4
4
5
5
name := " scala-swing"
6
6
7
- version := " 2.0.2 -SNAPSHOT"
7
+ version := " 2.0.3 -SNAPSHOT"
8
8
9
9
scalacOptions ++= Seq (" -deprecation" , " -feature" )
10
10
@@ -20,7 +20,13 @@ mimaPreviousVersion := Some("2.0.0")
20
20
// set the prompt (for this build) to include the project id.
21
21
shellPrompt in ThisBuild := { state => Project .extract(state).currentRef.project + " > " }
22
22
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
+ )
24
30
25
31
lazy val examples = project.in( file(" examples" ) )
26
32
.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 {
121
121
object Result extends Enumeration {
122
122
import JOptionPane ._
123
123
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
125
125
val No : Result .Value = Value (NO_OPTION )
126
126
val Cancel : Result .Value = Value (CANCEL_OPTION )
127
127
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