@@ -50,9 +50,9 @@ class BuildOptionsTests extends munit.FunSuite {
50
50
)
51
51
)
52
52
assert(
53
- options.projectParams.isLeft && options.projectParams.left.get. isInstanceOf [
54
- InvalidBinaryScalaVersionError
55
- ] ,
53
+ options.projectParams.swap.exists {
54
+ case _ : InvalidBinaryScalaVersionError => true ; case _ => false
55
+ } ,
56
56
s " specifying the 3. ${Int .MaxValue } scala version does not lead to the Invalid Binary Scala Version Error "
57
57
)
58
58
}
@@ -67,7 +67,9 @@ class BuildOptionsTests extends munit.FunSuite {
67
67
)
68
68
)
69
69
assert(
70
- options.projectParams.swap.exists { case _ : UnsupportedScalaVersionError => true ; case _ => false },
70
+ options.projectParams.swap.exists {
71
+ case _ : UnsupportedScalaVersionError => true ; case _ => false
72
+ },
71
73
" specifying the 2.11.2 scala version does not lead to the Unsupported Scala Version Error"
72
74
)
73
75
}
@@ -82,9 +84,9 @@ class BuildOptionsTests extends munit.FunSuite {
82
84
)
83
85
)
84
86
assert(
85
- options.projectParams.isLeft && options.projectParams.left.get. isInstanceOf [
86
- UnsupportedScalaVersionError
87
- ] ,
87
+ options.projectParams.swap.exists {
88
+ case _ : UnsupportedScalaVersionError => true ; case _ => false
89
+ } ,
88
90
" specifying the 2.11 scala version does not lead to the Unsupported Scala Version Error"
89
91
)
90
92
}
@@ -99,9 +101,9 @@ class BuildOptionsTests extends munit.FunSuite {
99
101
)
100
102
)
101
103
assert(
102
- options.projectParams.isLeft && options.projectParams.left.get. isInstanceOf [
103
- InvalidBinaryScalaVersionError
104
- ] ,
104
+ options.projectParams.swap.exists {
105
+ case _ : InvalidBinaryScalaVersionError => true ; case _ => false
106
+ } ,
105
107
" specifying the 3.2147483647.3 scala version does not lead to the Invalid Binary Scala Version Error"
106
108
)
107
109
}
@@ -116,9 +118,9 @@ class BuildOptionsTests extends munit.FunSuite {
116
118
)
117
119
)
118
120
assert(
119
- options.projectParams.isLeft && options.projectParams.left.get. isInstanceOf [
120
- NoValidScalaVersionFoundError
121
- ] ,
121
+ options.projectParams.swap.exists {
122
+ case _ : NoValidScalaVersionFoundError => true ; case _ => false
123
+ } ,
122
124
" specifying the wrong full scala 3 nightly version does not lead to the No Valid Scala Version Found Error"
123
125
)
124
126
}
@@ -131,9 +133,9 @@ class BuildOptionsTests extends munit.FunSuite {
131
133
)
132
134
)
133
135
assert(
134
- options.projectParams.isLeft && options.projectParams.left.get. isInstanceOf [
135
- NoValidScalaVersionFoundError
136
- ] ,
136
+ options.projectParams.swap.exists {
137
+ case _ : NoValidScalaVersionFoundError => true ; case _ => false
138
+ } ,
137
139
" specifying the wrong full scala 2 nightly version does not lead to the No Valid Scala Version Found Error"
138
140
)
139
141
}
@@ -147,9 +149,12 @@ class BuildOptionsTests extends munit.FunSuite {
147
149
supportedScalaVersionsUrl = None
148
150
)
149
151
)
150
- assert(options.projectParams.isLeft && options.projectParams.left.get.isInstanceOf [
151
- InvalidBinaryScalaVersionError
152
- ])
152
+ assert(
153
+ options.projectParams.swap.exists {
154
+ case _ : InvalidBinaryScalaVersionError => true ; case _ => false
155
+ },
156
+ s " specifying 2. ${Int .MaxValue } as Scala version does not lead to Invalid Binary Scala Version Error "
157
+ )
153
158
}
154
159
155
160
test(" -S 2.nightly option works" ) {
@@ -210,10 +215,7 @@ class BuildOptionsTests extends munit.FunSuite {
210
215
scalaOptions = ScalaOptions (
211
216
scalaVersion = prefix,
212
217
scalaBinaryVersion = None ,
213
- supportedScalaVersionsUrl =
214
- Some (
215
- Random .alphanumeric.take(10 ).mkString(" " )
216
- ) // invalid url, it should use defaults from Deps.sc
218
+ supportedScalaVersionsUrl = None
217
219
)
218
220
)
219
221
val scalaParams = options.scalaParams.orThrow
0 commit comments