File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
scalacheck/src/test/scala-2.13+/com/github/simy4/coregex/scalacheck Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ Use the provided `CoregexInstances` trait to constrain string arbitraries:
128128
129129``` scala
130130object MySpecification extends Properties (" MySpecification" ) with CoregexInstances {
131- property(" my property" ) = forAll { (str : String Matching " [a-zA-Z]{3}" ) =>
131+ property(" my property" ) = forAll { (str : StringMatching [ " [a-zA-Z]{3}" ] ) =>
132132 3 == str.length
133133 }
134134}
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ object CoregexSpecification extends Properties("Coregex") with CoregexInstances
4242
4343 property(" should generate matching ISO-8601 date string" ) = forAll {
4444 (iso8601Date : StringMatching [
45- " [12]\\ d{3}-(?:0[1-9]|1[012])-(?:0[1-9]|1\\ d|2[0-8])T(?:1\\ d|2[0-3]):[0-5]\\ d:[0-5]\\ d(\\ .\\ d{2}[1-9])?Z" ]) =>
45+ " [12]\\ d{3}-(?:0[1-9]|1[012])-(?:0[1-9]|1\\ d|2[0-8])T(?:1\\ d|2[0-3]):[0-5]\\ d:[0-5]\\ d(\\ .\\ d{2}[1-9])?Z"
46+ ]) =>
4647 val formatter = DateTimeFormatter .ISO_INSTANT
4748 (iso8601Date : String ) =? formatter.format(formatter.parse(iso8601Date))
4849 }
You can’t perform that action at this time.
0 commit comments