PerlTest.cs 970 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // assembly: System_test
  3. // namespace: MonoTests.System.Text.RegularExpressions
  4. // file: PerlTest.cs
  5. //
  6. // author: Dan Lewis ([email protected])
  7. // (c) 2002
  8. using System;
  9. using System.Text.RegularExpressions;
  10. using NUnit.Framework;
  11. namespace MonoTests.System.Text.RegularExpressions {
  12. public class PerlTest : TestCase {
  13. public static ITest Suite {
  14. get { return new TestSuite (typeof (PerlTest)); }
  15. }
  16. public PerlTest () : this ("System.Text.RegularExpressions Perl testsuite") { }
  17. public PerlTest (string name) : base (name) { }
  18. public void TestTrials () {
  19. foreach (RegexTrial trial in PerlTrials.trials) {
  20. string actual = trial.Execute ();
  21. if (actual != trial.Expected) {
  22. Assertion.Fail (
  23. trial.ToString () +
  24. "Expected " + trial.Expected +
  25. " but got " + actual
  26. );
  27. }
  28. }
  29. }
  30. protected override void SetUp () { }
  31. protected override void TearDown () { }
  32. }
  33. }