rahulpandey87 / mb-unit

Automatically exported from code.google.com/p/mb-unit
1 stars 0 forks source link

Contract verifier for regular expression testing #757

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
A contract verifier to help in testing a regular expression.

Basically, the contract verifier would test a given regex pattern against a set 
of expected valid and invalid input strings.

Proposed syntax:

public readonly IContract RegexTests = new RegexContractVerifier
{
  Pattern = @"$[A-Z]{3}^",
  ValidElements = { "ABC", "DEF" },
  InvalidElements = { "abc", "AB", "123", "ABCD" },
};

Bonus: supporting captures (syntax?)

Original issue reported on code.google.com by Yann.Tre...@gmail.com on 20 Oct 2010 at 1:29

GoogleCodeExporter commented 8 years ago

Original comment by Yann.Tre...@gmail.com on 14 Jun 2011 at 5:53