X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FMono.Globalization.Unicode%2FStringNormalizationTestSource.cs;h=81a384f45bf95395607ccec5f9f4eb46a99a9cb6;hb=1f930bb19d9ce3bee71f3ed9488b3b748385d0ec;hp=8eb1800ca0613465eb54ad2e527898ce0b3bf735;hpb=5bbfa8860b090e465a3aa45edeb9c94481ef1a22;p=mono.git diff --git a/mcs/class/corlib/Mono.Globalization.Unicode/StringNormalizationTestSource.cs b/mcs/class/corlib/Mono.Globalization.Unicode/StringNormalizationTestSource.cs index 8eb1800ca06..81a384f45bf 100644 --- a/mcs/class/corlib/Mono.Globalization.Unicode/StringNormalizationTestSource.cs +++ b/mcs/class/corlib/Mono.Globalization.Unicode/StringNormalizationTestSource.cs @@ -3,6 +3,8 @@ using System.Globalization; using System.Collections; using System.Text; +using Mono.Globalization.Unicode; + namespace MonoTests.System { public class StringNormalizationTest @@ -53,7 +55,19 @@ namespace MonoTests.System void TestString (Testcase tc, string expected, NormalizationForm f) { - string actual = tc.Source.Normalize (f); + string input = tc.Source; + string actual = null; + switch (f) { + default: + actual = Normalization.Normalize (input, 0); break; + case NormalizationForm.FormD: + actual = Normalization.Normalize (input, 1); break; + case NormalizationForm.FormKC: + actual = Normalization.Normalize (input, 2); break; + case NormalizationForm.FormKD: + actual = Normalization.Normalize (input, 3); break; + } + if (actual != expected) Console.WriteLine ("Error: expected {0} but was {1} (for {2},type{3} form {4})", expected, actual, tc.Source, tc.TestType, f);