Add prop-based test for the validID re-impl

This commit is contained in:
Dale Wijnand 2018-02-19 13:59:51 +00:00
parent 9370a2adf0
commit d66d0e34a9
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
/*
* sbt
* Copyright 2011 - 2017, Lightbend, Inc.
* Copyright 2008 - 2010, Mark Harrah
* Licensed under BSD-3-Clause license (see LICENSE)
*/
package sbt.internal.util
package complete
import org.scalacheck._, Prop._
object DefaultParsersSpec extends Properties("DefaultParsers") {
import DefaultParsers._
property("validID == matches(ID, s)") = forAll((s: String) => validID(s) == matches(ID, s))
}