@@ -878,8 +878,6 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
878
878
org.scalactic.Requirements .require(s4.isEmpty)
879
879
}
880
880
881
- // SKIP-DOTTY-START
882
- // TODO: missing support for `.isEmpty`, `.length`, `.size`, `.exists`, `.isInstanceOf`
883
881
it(" should throw IllegalArgumentException with correct message and stack depth when is used to check s3.isEmpty" ) {
884
882
val e = intercept[IllegalArgumentException ] {
885
883
org.scalactic.Requirements .require(s3.isEmpty)
@@ -979,12 +977,15 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
979
977
org.scalactic.Requirements .require(l1.isInstanceOf [List [Int ]])
980
978
}
981
979
980
+ // SKIP-DOTTY-START
981
+ // different printing of `List[Int]`
982
982
it(" should throw IllegalArgumentException with correct message and stack depth when is used to check s1.isInstanceOf[List[Int]]" ) {
983
983
val e = intercept[IllegalArgumentException ] {
984
984
org.scalactic.Requirements .require(s1.isInstanceOf [List [Int ]])
985
985
}
986
986
assert(e.getMessage == wasNotInstanceOf(s1, " scala.List" ))
987
987
}
988
+ // SKIP-DOTTY-END
988
989
989
990
it(" should do nothing when is used to check date.isInstanceOf[Date]" ) {
990
991
org.scalactic.Requirements .require(date.isInstanceOf [Date ])
@@ -1012,12 +1013,15 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
1012
1013
org.scalactic.Requirements .require(! s1.isInstanceOf [List [Int ]])
1013
1014
}
1014
1015
1016
+ // SKIP-DOTTY-START
1017
+ // different printing of `List[Int]`
1015
1018
it(" should throw IllegalArgumentException with correct message and stack depth when is used to check !l1.isInstanceOf[List[Int]]" ) {
1016
1019
val e = intercept[IllegalArgumentException ] {
1017
1020
org.scalactic.Requirements .require(! l1.isInstanceOf [List [Int ]])
1018
1021
}
1019
1022
assert(e.getMessage == wasInstanceOf(l1, " scala.List" ))
1020
1023
}
1024
+ // SKIP-DOTTY-END
1021
1025
1022
1026
it(" should do nothing when is used to check !l1.isInstanceOf[Date]" ) {
1023
1027
org.scalactic.Requirements .require(! l1.isInstanceOf [Date ])
@@ -1162,6 +1166,8 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
1162
1166
assert(e.getMessage == contained(l1, 3 ))
1163
1167
}
1164
1168
1169
+ // SKIP-DOTTY-START
1170
+ // different printing of anonymous functions
1165
1171
it(" should throw IllegalArgumentException with correct message and stack depth when is used to check l1.exists(_ > 3)" ) {
1166
1172
val e = intercept[IllegalArgumentException ] {
1167
1173
org.scalactic.Requirements .require(l1.exists(_ > 3 ))
@@ -1175,14 +1181,14 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
1175
1181
}
1176
1182
assert(e.getMessage == wasFalse(" l3.exists(((x$7: String) => x$7.isEmpty()))" ))
1177
1183
}
1184
+ // SKIP-DOTTY-END
1178
1185
1179
1186
it(" should throw IllegalArgumentException with correct message and stack depth when is used to check l3.exists(false)" ) {
1180
1187
val e = intercept[IllegalArgumentException ] {
1181
1188
org.scalactic.Requirements .require(ci1.exists(321 ))
1182
1189
}
1183
1190
assert(e.getMessage == wasFalse(" ci1.exists(321)" ))
1184
1191
}
1185
- // SKIP-DOTTY-END
1186
1192
1187
1193
def woof (f : => Unit ) = " woof"
1188
1194
def meow (x : Int = 0 , y : Int = 3 ) = " meow"
@@ -2035,8 +2041,6 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
2035
2041
org.scalactic.Requirements .require(s4.isEmpty, " , dude" )
2036
2042
}
2037
2043
2038
- // SKIP-DOTTY-START
2039
- // TODO: missing support for `.isEmpty`, `.length`, `.size`, `.exists`, `.isInstanceOf`
2040
2044
it(" should throw IllegalArgumentException with correct message and stack depth when is used to check s3.isEmpty" ) {
2041
2045
val e = intercept[IllegalArgumentException ] {
2042
2046
org.scalactic.Requirements .require(s3.isEmpty, " , dude" )
@@ -2136,12 +2140,15 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
2136
2140
org.scalactic.Requirements .require(l1.isInstanceOf [List [Int ]], " , dude" )
2137
2141
}
2138
2142
2143
+ // SKIP-DOTTY-START
2144
+ // different printing of `List[Int]`
2139
2145
it(" should throw IllegalArgumentException with correct message and stack depth when is used to check s1.isInstanceOf[List[Int]]" ) {
2140
2146
val e = intercept[IllegalArgumentException ] {
2141
2147
org.scalactic.Requirements .require(s1.isInstanceOf [List [Int ]], " , dude" )
2142
2148
}
2143
2149
assert(e.getMessage == wasNotInstanceOf(s1, " scala.List" ) + " , dude" )
2144
2150
}
2151
+ // SKIP-DOTTY-END
2145
2152
2146
2153
it(" should do nothing when is used to check date.isInstanceOf[Date]" ) {
2147
2154
org.scalactic.Requirements .require(date.isInstanceOf [Date ], " , dude" )
@@ -2169,12 +2176,15 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
2169
2176
org.scalactic.Requirements .require(! s1.isInstanceOf [List [Int ]], " , dude" )
2170
2177
}
2171
2178
2179
+ // SKIP-DOTTY-START
2180
+ // different printing of `List[Int]`
2172
2181
it(" should throw IllegalArgumentException with correct message and stack depth when is used to check !l1.isInstanceOf[List[Int]]" ) {
2173
2182
val e = intercept[IllegalArgumentException ] {
2174
2183
org.scalactic.Requirements .require(! l1.isInstanceOf [List [Int ]], " , dude" )
2175
2184
}
2176
2185
assert(e.getMessage == wasInstanceOf(l1, " scala.List" ) + " , dude" )
2177
2186
}
2187
+ // SKIP-DOTTY-END
2178
2188
2179
2189
it(" should do nothing when is used to check !l1.isInstanceOf[Date]" ) {
2180
2190
org.scalactic.Requirements .require(! l1.isInstanceOf [Date ], " , dude" )
@@ -2319,6 +2329,8 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
2319
2329
assert(e.getMessage == contained(l1, 3 ) + " , dude" )
2320
2330
}
2321
2331
2332
+ // SKIP-DOTTY-START
2333
+ // different printing of anonymous functions
2322
2334
it(" should throw IllegalArgumentException with correct message and stack depth when is used to check l1.exists(_ > 3)" ) {
2323
2335
val e = intercept[IllegalArgumentException ] {
2324
2336
org.scalactic.Requirements .require(l1.exists(_ > 3 ), " , dude" )
@@ -3152,8 +3164,6 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
3152
3164
org.scalactic.Requirements .requireState(s4.isEmpty)
3153
3165
}
3154
3166
3155
- // SKIP-DOTTY-START
3156
- // TODO: missing support for `.isEmpty`, `.length`, `.size`, `.exists`, `.isInstanceOf`
3157
3167
it(" should throw IllegalStateException with correct message and stack depth when is used to check s3.isEmpty" ) {
3158
3168
val e = intercept[IllegalStateException ] {
3159
3169
org.scalactic.Requirements .requireState(s3.isEmpty)
@@ -3253,12 +3263,15 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
3253
3263
org.scalactic.Requirements .requireState(l1.isInstanceOf [List [Int ]])
3254
3264
}
3255
3265
3266
+ // SKIP-DOTTY-START
3267
+ // different printing of `List[Int]`
3256
3268
it(" should throw IllegalStateException with correct message and stack depth when is used to check s1.isInstanceOf[List[Int]]" ) {
3257
3269
val e = intercept[IllegalStateException ] {
3258
3270
org.scalactic.Requirements .requireState(s1.isInstanceOf [List [Int ]])
3259
3271
}
3260
3272
assert(e.getMessage == wasNotInstanceOf(s1, " scala.List" ))
3261
3273
}
3274
+ // SKIP-DOTTY-END
3262
3275
3263
3276
it(" should do nothing when is used to check date.isInstanceOf[Date]" ) {
3264
3277
org.scalactic.Requirements .requireState(date.isInstanceOf [Date ])
@@ -3286,12 +3299,15 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
3286
3299
org.scalactic.Requirements .requireState(! s1.isInstanceOf [List [Int ]])
3287
3300
}
3288
3301
3302
+ // SKIP-DOTTY-START
3303
+ // different printing of `List[Int]`
3289
3304
it(" should throw IllegalStateException with correct message and stack depth when is used to check !l1.isInstanceOf[List[Int]]" ) {
3290
3305
val e = intercept[IllegalStateException ] {
3291
3306
org.scalactic.Requirements .requireState(! l1.isInstanceOf [List [Int ]])
3292
3307
}
3293
3308
assert(e.getMessage == wasInstanceOf(l1, " scala.List" ))
3294
3309
}
3310
+ // SKIP-DOTTY-END
3295
3311
3296
3312
it(" should do nothing when is used to check !l1.isInstanceOf[Date]" ) {
3297
3313
org.scalactic.Requirements .requireState(! l1.isInstanceOf [Date ])
@@ -3436,6 +3452,8 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
3436
3452
assert(e.getMessage == contained(l1, 3 ))
3437
3453
}
3438
3454
3455
+ // SKIP-DOTTY-START
3456
+ // different printing of anonymous functions
3439
3457
it(" should throw IllegalStateException with correct message and stack depth when is used to check l1.exists(_ > 3)" ) {
3440
3458
val e = intercept[IllegalStateException ] {
3441
3459
org.scalactic.Requirements .requireState(l1.exists(_ > 3 ))
@@ -3449,14 +3467,14 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
3449
3467
}
3450
3468
assert(e.getMessage == wasFalse(" l3.exists(((x$19: String) => x$19.isEmpty()))" ))
3451
3469
}
3470
+ // SKIP-DOTTY-END
3452
3471
3453
3472
it(" should throw IllegalStateException with correct message and stack depth when is used to check l3.exists(false)" ) {
3454
3473
val e = intercept[IllegalStateException ] {
3455
3474
org.scalactic.Requirements .requireState(ci1.exists(321 ))
3456
3475
}
3457
3476
assert(e.getMessage == wasFalse(" ci1.exists(321)" ))
3458
3477
}
3459
- // SKIP-DOTTY-END
3460
3478
3461
3479
def woof (f : => Unit ) = " woof"
3462
3480
def meow (x : Int = 0 , y : Int = 3 ) = " meow"
@@ -4309,8 +4327,6 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
4309
4327
org.scalactic.Requirements .requireState(s4.isEmpty, " , dude" )
4310
4328
}
4311
4329
4312
- // SKIP-DOTTY-START
4313
- // TODO: missing support for `.isEmpty`, `.length`, `.size`, `.exists`, `.isInstanceOf`
4314
4330
it(" should throw IllegalStateException with correct message and stack depth when is used to check s3.isEmpty" ) {
4315
4331
val e = intercept[IllegalStateException ] {
4316
4332
org.scalactic.Requirements .requireState(s3.isEmpty, " , dude" )
@@ -4410,12 +4426,15 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
4410
4426
org.scalactic.Requirements .requireState(l1.isInstanceOf [List [Int ]], " , dude" )
4411
4427
}
4412
4428
4429
+ // SKIP-DOTTY-START
4430
+ // different printing of `List[Int]`
4413
4431
it(" should throw IllegalStateException with correct message and stack depth when is used to check s1.isInstanceOf[List[Int]]" ) {
4414
4432
val e = intercept[IllegalStateException ] {
4415
4433
org.scalactic.Requirements .requireState(s1.isInstanceOf [List [Int ]], " , dude" )
4416
4434
}
4417
4435
assert(e.getMessage == wasNotInstanceOf(s1, " scala.List" ) + " , dude" )
4418
4436
}
4437
+ // SKIP-DOTTY-END
4419
4438
4420
4439
it(" should do nothing when is used to check date.isInstanceOf[Date]" ) {
4421
4440
org.scalactic.Requirements .requireState(date.isInstanceOf [Date ], " , dude" )
@@ -4443,12 +4462,15 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
4443
4462
org.scalactic.Requirements .requireState(! s1.isInstanceOf [List [Int ]], " , dude" )
4444
4463
}
4445
4464
4465
+ // SKIP-DOTTY-START
4466
+ // different printing of `List[Int]`
4446
4467
it(" should throw IllegalStateException with correct message and stack depth when is used to check !l1.isInstanceOf[List[Int]]" ) {
4447
4468
val e = intercept[IllegalStateException ] {
4448
4469
org.scalactic.Requirements .requireState(! l1.isInstanceOf [List [Int ]], " , dude" )
4449
4470
}
4450
4471
assert(e.getMessage == wasInstanceOf(l1, " scala.List" ) + " , dude" )
4451
4472
}
4473
+ // SKIP-DOTTY-END
4452
4474
4453
4475
it(" should do nothing when is used to check !l1.isInstanceOf[Date]" ) {
4454
4476
org.scalactic.Requirements .requireState(! l1.isInstanceOf [Date ], " , dude" )
@@ -4593,6 +4615,8 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
4593
4615
assert(e.getMessage == contained(l1, 3 ) + " , dude" )
4594
4616
}
4595
4617
4618
+ // SKIP-DOTTY-START
4619
+ // different printing of anonymous functions
4596
4620
it(" should throw IllegalStateException with correct message and stack depth when is used to check l1.exists(_ > 3)" ) {
4597
4621
val e = intercept[IllegalStateException ] {
4598
4622
org.scalactic.Requirements .requireState(l1.exists(_ > 3 ), " , dude" )
@@ -4606,14 +4630,14 @@ class DirectRequirementsSpec extends FunSpec with OptionValues {
4606
4630
}
4607
4631
assert(e.getMessage == wasFalse(" l3.exists(((x$25: String) => x$25.isEmpty()))" ) + " , dude" )
4608
4632
}
4633
+ // SKIP-DOTTY-END
4609
4634
4610
4635
it(" should throw IllegalStateException with correct message and stack depth when is used to check l3.exists(false)" ) {
4611
4636
val e = intercept[IllegalStateException ] {
4612
4637
org.scalactic.Requirements .requireState(ci1.exists(321 ), " , dude" )
4613
4638
}
4614
4639
assert(e.getMessage == wasFalse(" ci1.exists(321)" ) + " , dude" )
4615
4640
}
4616
- // SKIP-DOTTY-END
4617
4641
4618
4642
def woof (f : => Unit ) = " woof"
4619
4643
def meow (x : Int = 0 , y : Int = 3 ) = " meow"
0 commit comments