Skip to content

Commit 70df445

Browse files
committed
update README.
1 parent 409e428 commit 70df445

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Use the provided `CoregexInstances` trait to constrain string arbitraries:
128128

129129
```scala
130130
object 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
}

scalacheck/src/test/scala-2.13+/com/github/simy4/coregex/scalacheck/CoregexSpecification.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)