2 using System.Globalization;
3 using System.Collections;
6 namespace MonoTests.System
8 public class StringNormalizationTest
10 ArrayList tests = new ArrayList ();
14 public Testcase (string src, string nfc, string nfd, string nfkc, string nfkd, int testType)
33 public static void Main ()
35 new StringNormalizationTest ().Run ();
39 public StringNormalizationTest ()
46 foreach (Testcase tc in tests) {
47 TestString (tc, tc.NFD, NormalizationForm.FormD);
48 TestString (tc, tc.NFKD, NormalizationForm.FormKD);
49 TestString (tc, tc.NFC, NormalizationForm.FormC);
50 TestString (tc, tc.NFKC, NormalizationForm.FormKC);
54 void TestString (Testcase tc, string expected, NormalizationForm f)
56 string actual = tc.Source.Normalize (f);
57 if (actual != expected)
58 Console.WriteLine ("Error: expected {0} but was {1} (for {2},type{3} form {4})",
59 expected, actual, tc.Source, tc.TestType, f);
64 @@@@@@ Replace Here @@@@@@