Delete left-over globalization CoreCLR tests (#16571)
authorJan Kotas <jkotas@microsoft.com>
Tue, 27 Feb 2018 14:41:45 +0000 (06:41 -0800)
committerGitHub <noreply@github.com>
Tue, 27 Feb 2018 14:41:45 +0000 (06:41 -0800)
12 files changed:
tests/src/Common/CoreCLRTestLibrary/CalendarHelpers.cs [deleted file]
tests/src/Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj
tests/src/Common/CoreCLRTestLibrary/EndianessChecker.cs [deleted file]
tests/src/Common/CoreCLRTestLibrary/Generator.cs
tests/src/Common/CoreCLRTestLibrary/GlobLocHelper.cs [deleted file]
tests/src/Common/CoreCLRTestLibrary/Utilities.cs
tests/src/CoreMangLib/cti/system/string/StringCompare1.csproj [deleted file]
tests/src/CoreMangLib/cti/system/string/StringCompare15.csproj [deleted file]
tests/src/CoreMangLib/cti/system/string/StringCompare2.csproj [deleted file]
tests/src/CoreMangLib/cti/system/string/stringcompare1.cs [deleted file]
tests/src/CoreMangLib/cti/system/string/stringcompare15.cs [deleted file]
tests/src/CoreMangLib/cti/system/string/stringcompare2.cs [deleted file]

diff --git a/tests/src/Common/CoreCLRTestLibrary/CalendarHelpers.cs b/tests/src/Common/CoreCLRTestLibrary/CalendarHelpers.cs
deleted file mode 100644 (file)
index 8475ab6..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-//
-
-using System;
-using System.Globalization;
-
-public static class CalendarGet
-{
-    public static Calendar GregorianCalendar(GregorianCalendarTypes Type)
-    {
-        CultureInfo ci = null;
-
-        switch (Type)
-        {
-            case GregorianCalendarTypes.Arabic:
-                ci = new CultureInfo("ar-SA");
-                return ci.OptionalCalendars[4];
-            case GregorianCalendarTypes.Localized:
-                ci = new CultureInfo("ar-IQ");
-                return ci.OptionalCalendars[0];
-            case GregorianCalendarTypes.MiddleEastFrench:
-                ci = new CultureInfo("ar-IQ");
-                return ci.OptionalCalendars[4];
-            case GregorianCalendarTypes.TransliteratedEnglish:
-                ci = new CultureInfo("ar-IQ");
-                return ci.OptionalCalendars[5];
-            case GregorianCalendarTypes.TransliteratedFrench:
-                ci = new CultureInfo("ar-IQ");
-                return ci.OptionalCalendars[6];
-            case GregorianCalendarTypes.USEnglish:
-                ci = new CultureInfo("ar-IQ");
-                return ci.OptionalCalendars[3];
-            default:
-                throw new NotImplementedException();
-        }
-    }
-
-    public static Calendar JapaneseCalendar()
-    {
-        var ci = new CultureInfo("ja-JP");
-        return ci.OptionalCalendars[1];
-    }
-
-    public static Calendar ThaiBuddhistCalendar()
-    {
-        var ci = new CultureInfo("th-TH");
-        return ci.Calendar;
-    }
-
-    public static Calendar KoreanCalendar()
-    {
-        var ci = new System.Globalization.CultureInfo("ko-KR");
-        return ci.OptionalCalendars[1];
-    }
-
-    public static Calendar GregorianCalendar()
-    {
-        var ci = new System.Globalization.CultureInfo("en-US");
-        return ci.Calendar;
-    }
-
-    public static Calendar TaiwanCalendar()
-    {
-        var ci = new System.Globalization.CultureInfo("zh-TW");
-        return ci.OptionalCalendars[1];
-    }
-
-    public static Calendar HebrewCalendar()
-    {
-        var ci = new System.Globalization.CultureInfo("he-IL");
-        return ci.OptionalCalendars[1];
-    }
-
-    public static Calendar HijriCalendar()
-    {
-        var ci = new System.Globalization.CultureInfo("ar-SA");
-        return ci.OptionalCalendars[1];
-    }
-}
-
-public enum GregorianCalendarTypes
-{
-    Arabic,
-    USEnglish,
-    Localized,
-    MiddleEastFrench,
-    TransliteratedEnglish,
-    TransliteratedFrench,
-}
index e1af919..39ce217 100644 (file)
     </CodeAnalysisDependentAssemblyPaths>
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="CalendarHelpers.cs" />
-    <Compile Include="EndianessChecker.cs" />
     <Compile Include="Generator.cs" />
-    <Compile Include="GlobLocHelper.cs" />
     <Compile Include="Logging.cs" />
     <Compile Include="TestFramework.cs" />
     <Compile Include="Utilities.cs" />
diff --git a/tests/src/Common/CoreCLRTestLibrary/EndianessChecker.cs b/tests/src/Common/CoreCLRTestLibrary/EndianessChecker.cs
deleted file mode 100644 (file)
index 19aa883..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-//
-
-using System.Runtime.InteropServices;
-
-namespace TestLibrary
-{
-    [StructLayout(LayoutKind.Explicit)]
-    public struct EndianessChecker
-    {
-        [FieldOffset(3)]
-        byte myByte;
-        [FieldOffset(0)]
-        int myInt;
-
-        public static bool IsBigEndian()
-        {
-            EndianessChecker check = new EndianessChecker();
-
-            check.myByte = 1;
-            return (check.myInt == 1);
-        }
-
-        public static bool IsLittleEndian()
-        {
-            EndianessChecker check = new EndianessChecker();
-
-            check.myByte = 1;
-            return (check.myInt == 16777216);
-        }
-    }
-}
index bfb1cc5..666ce5b 100644 (file)
@@ -320,21 +320,6 @@ namespace TestLibrary
             return c;
         }
 
-        // if value is no-weight char, return true
-        public static bool NoWeightChar(int value)
-        {
-            if ((int)'a' == value) // 'a' = 97
-                return false;
-
-            String strA = "a" + Convert.ToChar(value);
-            String strB = "a";
-
-            if (0 == GlobLocHelper.OSCompare(CultureInfo.CurrentCulture, strA, 0, 2, strB, 0, 1, CompareOptions.None))
-                return true;
-
-            return false;
-        }
-
         // returns a  string.  If "validPath" is set, only valid path characters
         //  will be included
         public static string GetString(Int32 new_seed, Boolean validPath, Int32 minLength, Int32 maxLength)
diff --git a/tests/src/Common/CoreCLRTestLibrary/GlobLocHelper.cs b/tests/src/Common/CoreCLRTestLibrary/GlobLocHelper.cs
deleted file mode 100644 (file)
index 50883ce..0000000
+++ /dev/null
@@ -1,2330 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-//
-
-using System;
-using System.Text;
-using System.Security;
-using System.Threading;
-using System.Reflection;
-using System.Globalization;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-
-namespace TestLibrary
-{
-#if !FEATURE_NOPINVOKES
-    public static class GlobLocHelper
-    {
-        #region OS Interop
-
-        #region Windows P/Invokes
-        [DllImport("api-ms-win-core-string-l1-1-0.dll")]
-        private extern static int CompareStringW(int lcid, int flags, [MarshalAs(UnmanagedType.LPWStr)] string str1, int length1, [MarshalAs(UnmanagedType.LPWStr)]string str2, int length2);
-
-        [DllImportAttribute("api-ms-win-core-string-l1-1-0.dll")]
-        public static extern int CompareStringEx([MarshalAs(UnmanagedType.LPWStr)]string lpLocaleName, int dwCmpFlags, [MarshalAs(UnmanagedType.LPWStr)]string lpString1, int cchCount1, [MarshalAs(UnmanagedType.LPWStr)] string lpString2, int cchCount2, System.IntPtr lpVersionInformation, System.IntPtr lpReserved, IntPtr lParam);
-
-        [DllImportAttribute("api-ms-win-core-string-l1-1-0.dll")]
-        public static extern int CompareStringOrdinal([MarshalAs(UnmanagedType.LPWStr)]string lpString1, int cchCount1, [MarshalAs(UnmanagedType.LPWStr)] string lpString2, int cchCount2, bool bIgnoreCase);
-
-        [DllImport("api-ms-win-core-localization-l1-2-0.dll")]
-        private extern static int LCMapStringW(int lcid, int flags, [MarshalAs(UnmanagedType.LPWStr)] string str1, int length1, [MarshalAs(UnmanagedType.LPWStr)] string str2, int length2);
-
-        [DllImport("api-ms-win-core-localization-l1-2-0.dll")]
-        private extern static int LCMapStringEx([MarshalAs(UnmanagedType.LPWStr)]string lpLocaleName, int dwMapFlags, [MarshalAs(UnmanagedType.LPWStr)] string lpSrcStr, int cchSrc, [MarshalAs(UnmanagedType.LPWStr)] string lpDestStr, int cchDest, System.IntPtr lpVersionInformation, System.IntPtr lpReserved, IntPtr lParam);
-
-        [DllImport("api-ms-win-core-datetime-l1-1-0.dll", CharSet = CharSet.Unicode)]
-        static extern int GetDateFormatW(uint locale, uint dwFlags, ref SystemTime date, string format, StringBuilder sb, int sbSize);
-
-        [DllImport("api-ms-win-core-datetime-l1-1-0.dll", CharSet = CharSet.Unicode)]
-        static extern int GetTimeFormatW(uint locale, uint dwFlags, ref SystemTime time, string format, StringBuilder sb, int sbSize);
-
-        [DllImport("api-ms-win-core-localization-l1-2-0.dll", EntryPoint = "GetLocaleInfoW", CharSet = CharSet.Unicode)]
-        static extern int GetLocaleInfo(uint Locale, uint LCType,
-           [Out] StringBuilder lpLCData, int cchData);
-
-        public delegate bool DateTimeFormatDelegate(string infoStr);
-
-        [DllImport("api-ms-win-core-errorhandling-l1-1-0.dll")]
-        static extern int GetLastError();
-        #endregion
-
-        #region Interop Structs
-
-        internal struct CFRange
-        {
-#if X86
-                       internal int x;
-            internal int y;
-#else
-            internal long x;
-            internal long y;
-#endif
-
-#if X86
-            public CFRange(int a, int b)
-#else
-            public CFRange(long a, long b)
-#endif
-            {
-                x = a; y = b;
-            }
-        }
-
-        [StructLayout(LayoutKind.Sequential)]
-        public struct SystemTime
-        {
-            [MarshalAs(UnmanagedType.U2)]
-            public ushort Year;
-            [MarshalAs(UnmanagedType.U2)]
-            public ushort Month;
-            [MarshalAs(UnmanagedType.U2)]
-            public ushort DayOfWeek;
-            [MarshalAs(UnmanagedType.U2)]
-            public ushort Day;
-            [MarshalAs(UnmanagedType.U2)]
-            public ushort Hour;
-            [MarshalAs(UnmanagedType.U2)]
-            public ushort Minute;
-            [MarshalAs(UnmanagedType.U2)]
-            public ushort Second;
-            [MarshalAs(UnmanagedType.U2)]
-            public ushort Millisecond;
-
-            public SystemTime(DateTime dt)
-            {
-                Year = (ushort)dt.Year;
-                Month = (ushort)dt.Month;
-                DayOfWeek = (ushort)dt.DayOfWeek;
-                Day = (ushort)dt.Day;
-                Hour = (ushort)dt.Hour;
-                Minute = (ushort)dt.Minute;
-                Second = (ushort)dt.Second;
-                Millisecond = (ushort)dt.Millisecond;
-            }
-        }
-        #endregion
-
-        #region Constants, Enums, and Constant-Retrieving Methods
-        [SecuritySafeCritical]
-        private static unsafe IntPtr GetCFFunction(string input)
-        {
-#if REMOVE
-            string bundleName = "com.apple.CoreFoundation";
-            IntPtr cfBundleName = CFStringCreateWithCharacters(IntPtr.Zero, bundleName, bundleName.Length);
-            IntPtr cfDataName = CFStringCreateWithCharacters(IntPtr.Zero, input, input.Length);
-
-            IntPtr cfBundle = CFBundleGetBundleWithIdentifier(cfBundleName);
-            IntPtr ret = (IntPtr)(CFBundleGetFunctionPointerForName(cfBundle, cfDataName));
-
-            // cfBundle can't be released within this function because we don't "own it". Release it may cause memory corruption.
-            // http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-SW1
-
-            if (cfBundleName != IntPtr.Zero)
-                CFRelease(cfBundleName);
-
-            if (cfDataName != IntPtr.Zero)
-                CFRelease(cfDataName);
-
-            return ret;
-#else
-            throw new NotImplementedException();
-#endif
-        }
-        [SecuritySafeCritical]
-        private static unsafe IntPtr GetCFString(string input)
-        {
-#if TEMP
-            string bundleName = "com.apple.CoreFoundation";
-            IntPtr cfBundleName = CFStringCreateWithCharacters(IntPtr.Zero, bundleName, bundleName.Length);
-            IntPtr cfDataName = CFStringCreateWithCharacters(IntPtr.Zero, input, input.Length);
-
-            IntPtr cfBundle = CFBundleGetBundleWithIdentifier(cfBundleName);
-#if X86
-            IntPtr ret = (IntPtr)(*(int*)(CFBundleGetDataPointerForName(cfBundle, cfDataName)));
-#else
-            long ptr = *((long*)(CFBundleGetDataPointerForName(cfBundle, cfDataName)));
-            IntPtr ret = new IntPtr(ptr);
-#endif //X86
-
-            // cfBundle can't be released within this function because we don't "own it". Release it may cause memory corruption.
-            // http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-SW1
-
-            if (cfBundleName != IntPtr.Zero)
-                CFRelease(cfBundleName);
-
-            if (cfDataName != IntPtr.Zero)
-                CFRelease(cfDataName);
-
-            return ret;
-#else
-            throw new NotImplementedException();
-#endif
-        }
-
-        private const int NORM_IGNORECASE = 0x00000001;       // Ignores case.  
-        private const int NORM_IGNOREKANATYPE = 0x00010000;       // Does not differentiate between Hiragana and Katakana characters. Corresponding Hiragana and Katakana will compare as equal. 
-        private const int NORM_IGNORENONSPACE = 0x00000002;       // Ignores nonspacing. This flag also removes Japanese accent characters. 
-        private const int NORM_IGNORESYMBOLS = 0x00000004;       // Ignores symbols.  
-        private const int NORM_IGNOREWIDTH = 0x00020000;       // Does not differentiate between a single-byte character and the same character as a double-byte character. 
-        private const int NORM_LINGUISTIC_CASING = 0x08000000; // for Ordinal comparison
-        private const int SORT_STRINGSORT = 0x00001000;       // Treats punctuation the same as symbols. 
-
-        private const int LCMAP_UPPERCASE = 0x00000200;
-        private const int LCMAP_LOWERCASE = 0x00000100;
-        private const int LCMAP_LINGUISTIC_CASING = 0x01000000;
-
-        private const long WIN32_CF_TICKS_RATIO = 10000000;
-        private const long WIN32_CF_TICKS_DELTA = 63113904000;
-
-        private static char[] allStandardFormats = 
-        {
-            'd', 'D', 'f', 'F', 'g', 'G', 
-            'm', 'M', 'o', 'O', 'r', 'R', 
-            's', 't', 'T', 'u', 'U', 'y', 'Y',
-        };
-
-        [Flags]
-        private enum CFStringNormalizationForm
-        {
-            kCFStringNormalizationFormD = 0,
-            kCFStringNormalizationFormKD = 1,
-            kCFStringNormalizationFormC = 2,
-            kCFStringNormalizationFormKC = 3
-        };
-
-        [Flags]
-        private enum TimeFormatFlags
-        {
-            TIME_NOMINUTESORSECONDS = 1,
-            TIME_NOSECONDS = 2,
-            TIME_NOTIMEMARKER = 4,
-            TIME_FORCE24HOURFORMAT = 8,
-            TIME_LONGTIME = 0,
-            TIME_SHORTTIME = 2
-        };
-
-        [Flags]
-        private enum DateFormatFlags
-        {
-            DATE_SHORTDATE = 1,
-            DATE_LONGDATE = 2,
-            DATE_YEARMONTH = 8
-        };
-
-        private enum CFNumberFormatterStyle
-        {
-            kCFNumberFormatterNoStyle = 0,
-            kCFNumberFormatterDecimalStyle = 1,
-            kCFNumberFormatterCurrencyStyle = 2,
-            kCFNumberFormatterPercentStyle = 3,
-            kCFNumberFormatterScientificStyle = 4,
-            kCFNumberFormatterSpellOutStyle = 5
-        } ;
-
-
-        [Flags]
-        private enum CFStringCompareFlags
-        {
-            kCFCompareCaseInsensitive = 1,
-            kCFCompareBackwards = 4,
-            kCFCompareAnchored = 8,
-            kCFCompareNonliteral = 16,
-            kCFCompareLocalized = 32,
-            kCFCompareNumerically = 64
-        };
-
-        private enum CFDateFormatterStyle
-        {
-            kCFDateFormatterNoStyle = 0,
-            kCFDateFormatterShortStyle = 1,
-            kCFDateFormatterMediumStyle = 2,
-            kCFDateFormatterLongStyle = 3,
-            kCFDateFormatterFullStyle = 4
-        };
-
-        private enum CFNumberType
-        {
-            kCFNumberSInt8Type = 1,
-            kCFNumberSInt16Type = 2,
-            kCFNumberSInt32Type = 3,
-            kCFNumberSInt64Type = 4,
-            kCFNumberFloat32Type = 5,
-            kCFNumberFloat64Type = 6,
-            kCFNumberCharType = 7,
-            kCFNumberShortType = 8,
-            kCFNumberIntType = 9,
-            kCFNumberLongType = 10,
-            kCFNumberLongLongType = 11,
-            kCFNumberFloatType = 12,
-            kCFNumberDoubleType = 13,
-            kCFNumberCFIndexType = 14,
-            kCFNumberMaxType = 14
-        };
-
-        private static bool IsIntType(CFNumberType numType)
-        {
-            return (numType == CFNumberType.kCFNumberSInt8Type ||
-                    numType == CFNumberType.kCFNumberSInt16Type ||
-                    numType == CFNumberType.kCFNumberSInt32Type ||
-                    numType == CFNumberType.kCFNumberSInt64Type ||
-                    numType == CFNumberType.kCFNumberCharType ||
-                    numType == CFNumberType.kCFNumberShortType ||
-                    numType == CFNumberType.kCFNumberIntType ||
-                    numType == CFNumberType.kCFNumberLongType ||
-                    numType == CFNumberType.kCFNumberLongLongType);
-        }
-
-        private enum LCType
-        {
-            LOCALE_SENGLANGUAGE = 0x00001001, /* English name of language */
-            LOCALE_SABBREVLANGNAME = 0x00000003, /* abbreviated language name */
-            LOCALE_SNATIVELANGNAME = 0x00000004, /* native name of language */
-
-            LOCALE_SENGCOUNTRY = 0x00001002, /* English name of country */
-            LOCALE_SABBREVCTRYNAME = 0x00000007, /* abbreviated country name */
-            LOCALE_SNATIVECTRYNAME = 0x00000008, /* native name of country */
-
-            LOCALE_SLIST = 0x0000000C, /* list item separator */
-            LOCALE_IMEASURE = 0x0000000D, /* 0 = metric, 1 = US */
-
-            LOCALE_SDECIMAL = 0x0000000E, /* decimal separator */
-            LOCALE_STHOUSAND = 0x0000000F, /* thousand separator */
-            LOCALE_SGROUPING = 0x00000010, /* digit grouping */
-            LOCALE_IDIGITS = 0x00000011, /* number of fractional digits */
-            LOCALE_ILZERO = 0x00000012, /* leading zeros for decimal */
-            LOCALE_INEGNUMBER = 0x00001010, /* negative number mode */
-            LOCALE_SNATIVEDIGITS = 0x00000013, /* native ascii 0-9 */
-
-            LOCALE_SCURRENCY = 0x00000014, /* local monetary symbol */
-            LOCALE_SINTLSYMBOL = 0x00000015, /* intl monetary symbol */
-            LOCALE_SMONDECIMALSEP = 0x00000016, /* monetary decimal separator */
-            LOCALE_SMONTHOUSANDSEP = 0x00000017, /* monetary thousand separator */
-            LOCALE_SMONGROUPING = 0x00000018, /* monetary grouping */
-            LOCALE_ICURRDIGITS = 0x00000019, /* # local monetary digits */
-            LOCALE_IINTLCURRDIGITS = 0x0000001A, /* # intl monetary digits */
-            LOCALE_ICURRENCY = 0x0000001B, /* positive currency mode */
-            LOCALE_INEGCURR = 0x0000001C, /* negative currency mode */
-
-            LOCALE_SPERCENT = 0x00000076,   // Win7orLater-Symbol used to indicate percentage, for example, "%".
-            LOCALE_IPOSITIVEPERCENT = 0x00000075, // Win7orLater-Positive percentage formatting pattern for the locale.
-            LOCALE_INEGATIVEPERCENT = 0x00000074, // Win7orLater-Negative percentage formatting pattern for the locale.
-
-            LOCALE_SSHORTDATE = 0x0000001F, /* short date format string */
-            LOCALE_SLONGDATE = 0x00000020, /* long date format string */
-            LOCALE_STIMEFORMAT = 0x00001003, /* time format string */
-            LOCALE_S1159 = 0x00000028, /* AM designator */
-            LOCALE_S2359 = 0x00000029, /* PM designator */
-
-            LOCALE_ICALENDARTYPE = 0x00001009, /* type of calendar specifier */
-            LOCALE_IFIRSTDAYOFWEEK = 0x0000100C, /* first day of week specifier */
-            LOCALE_IFIRSTWEEKOFYEAR = 0x0000100D, /* first week of year specifier */
-
-            LOCALE_SDAYNAME1 = 0x0000002A, /* long name for Monday */
-            LOCALE_SDAYNAME2 = 0x0000002B, /* long name for Tuesday */
-            LOCALE_SDAYNAME3 = 0x0000002C, /* long name for Wednesday */
-            LOCALE_SDAYNAME4 = 0x0000002D, /* long name for Thursday */
-            LOCALE_SDAYNAME5 = 0x0000002E, /* long name for Friday */
-            LOCALE_SDAYNAME6 = 0x0000002F, /* long name for Saturday */
-            LOCALE_SDAYNAME7 = 0x00000030, /* long name for Sunday */
-            LOCALE_SABBREVDAYNAME1 = 0x00000031, /* abbreviated name for Monday */
-            LOCALE_SABBREVDAYNAME2 = 0x00000032, /* abbreviated name for Tuesday */
-            LOCALE_SABBREVDAYNAME3 = 0x00000033, /* abbreviated name for Wednesday */
-            LOCALE_SABBREVDAYNAME4 = 0x00000034, /* abbreviated name for Thursday */
-            LOCALE_SABBREVDAYNAME5 = 0x00000035, /* abbreviated name for Friday */
-            LOCALE_SABBREVDAYNAME6 = 0x00000036, /* abbreviated name for Saturday */
-            LOCALE_SABBREVDAYNAME7 = 0x00000037, /* abbreviated name for Sunday */
-            LOCALE_SMONTHNAME1 = 0x00000038, /* long name for January */
-            LOCALE_SMONTHNAME2 = 0x00000039, /* long name for February */
-            LOCALE_SMONTHNAME3 = 0x0000003A, /* long name for March */
-            LOCALE_SMONTHNAME4 = 0x0000003B, /* long name for April */
-            LOCALE_SMONTHNAME5 = 0x0000003C, /* long name for May */
-            LOCALE_SMONTHNAME6 = 0x0000003D, /* long name for June */
-            LOCALE_SMONTHNAME7 = 0x0000003E, /* long name for July */
-            LOCALE_SMONTHNAME8 = 0x0000003F, /* long name for August */
-            LOCALE_SMONTHNAME9 = 0x00000040, /* long name for September */
-            LOCALE_SMONTHNAME10 = 0x00000041, /* long name for October */
-            LOCALE_SMONTHNAME11 = 0x00000042, /* long name for November */
-            LOCALE_SMONTHNAME12 = 0x00000043, /* long name for December */
-            LOCALE_SMONTHNAME13 = 0x0000100E, /* long name for 13th month (if exists) */
-            LOCALE_SABBREVMONTHNAME1 = 0x00000044, /* abbreviated name for January */
-            LOCALE_SABBREVMONTHNAME2 = 0x00000045, /* abbreviated name for February */
-            LOCALE_SABBREVMONTHNAME3 = 0x00000046, /* abbreviated name for March */
-            LOCALE_SABBREVMONTHNAME4 = 0x00000047, /* abbreviated name for April */
-            LOCALE_SABBREVMONTHNAME5 = 0x00000048, /* abbreviated name for May */
-            LOCALE_SABBREVMONTHNAME6 = 0x00000049, /* abbreviated name for June */
-            LOCALE_SABBREVMONTHNAME7 = 0x0000004A, /* abbreviated name for July */
-            LOCALE_SABBREVMONTHNAME8 = 0x0000004B, /* abbreviated name for August */
-            LOCALE_SABBREVMONTHNAME9 = 0x0000004C, /* abbreviated name for September */
-            LOCALE_SABBREVMONTHNAME10 = 0x0000004D, /* abbreviated name for October */
-            LOCALE_SABBREVMONTHNAME11 = 0x0000004E, /* abbreviated name for November */
-            LOCALE_SABBREVMONTHNAME12 = 0x0000004F, /* abbreviated name for December */
-            LOCALE_SABBREVMONTHNAME13 = 0x0000100F, /* abbreviated name for 13th month (if exists) */
-
-            LOCALE_SPOSITIVESIGN = 0x00000050, /* positive sign */
-            LOCALE_SNEGATIVESIGN = 0x00000051, /* negative sign */
-
-            LOCALE_FONTSIGNATURE = 0x00000058, /* font signature */
-            LOCALE_SISO639LANGNAME = 0x00000059, /* ISO abbreviated language name */
-            LOCALE_SISO3166CTRYNAME = 0x0000005A, /* ISO abbreviated country name */
-
-            LOCALE_SENGCURRNAME = 0x00001007, /* english name of currency */
-            LOCALE_SNATIVECURRNAME = 0x00001008, /* native name of currency */
-            LOCALE_SYEARMONTH = 0x00001006, /* year month format string */
-            LOCALE_IDIGITSUBSTITUTION = 0x00001014, /* 0 = context, 1 = none, 2 = national */
-
-            LOCALE_SNAME = 0x0000005C    /* locale name <language>[-<Script>][-<REGION>[_<sort order>]] */
-        };
-        #endregion
-        #endregion
-
-        #region Number Formatting Methods
-
-        #region Number -> String methods
-
-        // Do not use these methods for all verification. These should be used mainly for simple formats ("C", "G", etc).
-        // These methods will verify that all locale information is being retrieved correctly from the OS.
-        // They will not, however, test the actual interpretation of that information (the formatting). Therefore, there must be some
-        // tests (both with standard and with custom format strings) that do not use these helpers. These are, obviously
-        // not meant for testing custom nfi formatting.
-
-        public static string OSDoubleToString(double n) { return OSDoubleToString(n, "G", null); }
-        public static string OSDoubleToString(double n, string s) { return OSDoubleToString(n, s, null); }
-        public static string OSDoubleToString(double n, CultureInfo ci) { return OSDoubleToString(n, "G", ci); }
-
-        [SecuritySafeCritical]
-        public static unsafe string OSDoubleToString(double n, string s, CultureInfo ci)
-        {
-            // DDT #965
-            if (double.IsPositiveInfinity(n)) { return "Infinity"; }
-            if (double.IsNegativeInfinity(n)) { return "-Infinity"; }
-            if (double.IsNaN(n)) { return "NaN"; };
-
-            if (Utilities.IsWindows)
-            {
-                NumberFormatInfo nfi = NumberFormatInfoFromLCID(LCIDFromCultureInfo(ci));
-                return n.ToString(s, nfi);
-            }
-            else
-            {
-                return OSNumberToStringMac(new IntPtr((void*)&n), s, ci, CFNumberType.kCFNumberDoubleType, n);
-            }
-        }
-
-        public static string OSDecimalToString(decimal n) { return OSDecimalToString(n, "G", null); }
-        public static string OSDecimalToString(decimal n, string s) { return OSDecimalToString(n, s, null); }
-        public static string OSDecimalToString(decimal n, CultureInfo ci) { return OSDecimalToString(n, "G", ci); }
-
-        [SecuritySafeCritical]
-        public static unsafe string OSDecimalToString(decimal n, string s, CultureInfo ci)
-        {
-            if (Utilities.IsWindows)
-            {
-                NumberFormatInfo nfi = NumberFormatInfoFromLCID(LCIDFromCultureInfo(ci));
-                return n.ToString(s, nfi);
-            }
-            else
-            {
-                double d1 = (double)n;
-                return OSNumberToStringMac(new IntPtr((void*)&d1), s, ci, CFNumberType.kCFNumberFloat64Type, n);
-            }
-        }
-
-        public static string OSFloatToString(float n) { return OSFloatToString(n, "G", null); }
-        public static string OSFloatToString(float n, string s) { return OSFloatToString(n, s, null); }
-        public static string OSFloatToString(float n, CultureInfo ci) { return OSFloatToString(n, "G", ci); }
-
-        [SecuritySafeCritical]
-        public static unsafe string OSFloatToString(float n, string s, CultureInfo ci)
-        {
-            if (Utilities.IsWindows)
-            {
-                NumberFormatInfo nfi = NumberFormatInfoFromLCID(LCIDFromCultureInfo(ci));
-                return n.ToString(s, nfi);
-            }
-            else
-            {
-                return OSNumberToStringMac(new IntPtr((void*)&n), s, ci, CFNumberType.kCFNumberFloat32Type, n);
-            }
-        }
-
-        public static string OSInt32ToString(Int32 n) { return OSInt32ToString(n, "G", null); }
-        public static string OSInt32ToString(Int32 n, string s) { return OSInt32ToString(n, s, null); }
-        public static string OSInt32ToString(Int32 n, CultureInfo ci) { return OSInt32ToString(n, "G", ci); }
-
-        [SecuritySafeCritical]
-        public static unsafe string OSInt32ToString(Int32 n, string s, CultureInfo ci)
-        {
-            if (Utilities.IsWindows)
-            {
-                NumberFormatInfo nfi = NumberFormatInfoFromLCID(LCIDFromCultureInfo(ci));
-                return n.ToString(s, nfi);
-            }
-            else
-            {
-                return OSNumberToStringMac(new IntPtr((void*)&n), s, ci, CFNumberType.kCFNumberIntType, n);
-            }
-        }
-
-        public static string OSInt64ToString(Int64 n) { return OSInt64ToString(n, "G", null); }
-        public static string OSInt64ToString(Int64 n, string s) { return OSInt64ToString(n, s, null); }
-        public static string OSInt64ToString(Int64 n, CultureInfo ci) { return OSInt64ToString(n, "G", ci); }
-
-        [SecuritySafeCritical]
-        public static unsafe string OSInt64ToString(Int64 n, string s, CultureInfo ci)
-        {
-            if (Utilities.IsWindows)
-            {
-                NumberFormatInfo nfi = NumberFormatInfoFromLCID(LCIDFromCultureInfo(ci));
-                return n.ToString(s, nfi);
-            }
-            else
-            {
-                return OSNumberToStringMac(new IntPtr((void*)&n), s, ci, CFNumberType.kCFNumberSInt64Type, n);
-            }
-        }
-
-        public static string OSInt16ToString(Int16 n) { return OSInt16ToString(n, "G", null); }
-        public static string OSInt16ToString(Int16 n, string s) { return OSInt16ToString(n, s, null); }
-        public static string OSInt16ToString(Int16 n, CultureInfo ci) { return OSInt16ToString(n, "G", ci); }
-
-        [SecuritySafeCritical]
-        public static unsafe string OSInt16ToString(Int16 n, string s, CultureInfo ci)
-        {
-            if (Utilities.IsWindows)
-            {
-                NumberFormatInfo nfi = NumberFormatInfoFromLCID(LCIDFromCultureInfo(ci));
-                return n.ToString(s, nfi);
-            }
-            else
-            {
-                return OSNumberToStringMac(new IntPtr((void*)&n), s, ci, CFNumberType.kCFNumberSInt16Type, n);
-            }
-        }
-
-        public static string OSUInt32ToString(UInt32 n) { return OSUInt32ToString(n, "G", null); }
-        public static string OSUInt32ToString(UInt32 n, string s) { return OSUInt32ToString(n, s, null); }
-        public static string OSUInt32ToString(UInt32 n, CultureInfo ci) { return OSUInt32ToString(n, "G", ci); }
-
-        [SecuritySafeCritical]
-        public static unsafe string OSUInt32ToString(UInt32 n1, string s, CultureInfo ci)
-        {
-            Int64 n = (Int64)n1;
-            if (Utilities.IsWindows)
-            {
-                NumberFormatInfo nfi = NumberFormatInfoFromLCID(LCIDFromCultureInfo(ci));
-                return n.ToString(s, nfi);
-            }
-            else
-            {
-                //return OSNumberToStringMac(new IntPtr((void*)&n), s, ci, CFNumberType.kCFNumberIntType, n);
-                return OSNumberToStringMac(new IntPtr((void*)&n), s, ci, CFNumberType.kCFNumberSInt64Type, n);
-            }
-        }
-
-        public static string OSUInt64ToString(UInt64 n) { return OSUInt64ToString(n, "G", null); }
-        public static string OSUInt64ToString(UInt64 n, string s) { return OSUInt64ToString(n, s, null); }
-        public static string OSUInt64ToString(UInt64 n, CultureInfo ci) { return OSUInt64ToString(n, "G", ci); }
-
-        [SecuritySafeCritical]
-        public static unsafe string OSUInt64ToString(UInt64 n, string s, CultureInfo ci)
-        {
-            if (Utilities.IsWindows)
-            {
-                NumberFormatInfo nfi = NumberFormatInfoFromLCID(LCIDFromCultureInfo(ci));
-                return n.ToString(s, nfi);
-            }
-            else
-            {
-                return OSNumberToStringMac(new IntPtr((void*)&n), s, ci, CFNumberType.kCFNumberLongLongType, n);
-            }
-        }
-
-        public static string OSUInt16ToString(UInt16 n) { return OSUInt16ToString(n, "G", null); }
-        public static string OSUInt16ToString(UInt16 n, string s) { return OSUInt16ToString(n, s, null); }
-        public static string OSUInt16ToString(UInt16 n, CultureInfo ci) { return OSUInt16ToString(n, "G", ci); }
-
-        [SecuritySafeCritical]
-        public static unsafe string OSUInt16ToString(UInt16 n1, string s, CultureInfo ci)
-        {
-            Int32 n = (Int32)n1;
-            if (Utilities.IsWindows)
-            {
-                NumberFormatInfo nfi = NumberFormatInfoFromLCID(LCIDFromCultureInfo(ci));
-                return n.ToString(s, nfi);
-            }
-            else
-            {
-                return OSNumberToStringMac(new IntPtr((void*)&n), s, ci, CFNumberType.kCFNumberSInt32Type, n);
-            }
-        }
-
-        public static string OSByteToString(Byte n) { return OSByteToString(n, "G", null); }
-        public static string OSByteToString(Byte n, string s) { return OSByteToString(n, s, null); }
-        public static string OSByteToString(Byte n, CultureInfo ci) { return OSByteToString(n, "G", ci); }
-
-        [SecuritySafeCritical]
-        public static unsafe string OSByteToString(Byte n1, string s, CultureInfo ci)
-        {
-            short n = (short)n1;
-            if (Utilities.IsWindows)
-            {
-                NumberFormatInfo nfi = NumberFormatInfoFromLCID(LCIDFromCultureInfo(ci));
-                return n.ToString(s, nfi);
-            }
-            else
-            {
-                return OSNumberToStringMac(new IntPtr((void*)&n), s, ci, CFNumberType.kCFNumberShortType, n);
-            }
-        }
-
-        public static string OSSByteToString(SByte n) { return OSSByteToString(n, "G", null); }
-        public static string OSSByteToString(SByte n, string s) { return OSSByteToString(n, s, null); }
-        public static string OSSByteToString(SByte n, CultureInfo ci) { return OSSByteToString(n, "G", ci); }
-
-        [SecuritySafeCritical]
-        public static unsafe string OSSByteToString(SByte n, string s, CultureInfo ci)
-        {
-            if (Utilities.IsWindows)
-            {
-                NumberFormatInfo nfi = NumberFormatInfoFromLCID(LCIDFromCultureInfo(ci));
-                return n.ToString(s, nfi);
-            }
-            else
-            {
-                return OSNumberToStringMac(new IntPtr((void*)&n), s, ci, CFNumberType.kCFNumberSInt8Type, n);
-            }
-        }
-        #endregion
-
-        public static NumberFormatInfo NumberFormatInfoFromLCID(int LCID)
-        {
-            // Use GetLocaleInfo to construct NFI
-            NumberFormatInfo ret = new NumberFormatInfo();
-            ret.CurrencyDecimalDigits = int.Parse(GetLocalizationInfo(LCID, LCType.LOCALE_ICURRDIGITS));
-            ret.CurrencyDecimalSeparator = GetLocalizationInfo(LCID, LCType.LOCALE_SMONDECIMALSEP);
-            ret.CurrencyGroupSeparator = GetLocalizationInfo(LCID, LCType.LOCALE_SMONTHOUSANDSEP);
-            string[] monGroupSizesStrs = GetLocalizationInfo(LCID, LCType.LOCALE_SMONGROUPING).Split(new char[] { ';' });
-            int[] monGroupSizes = new int[monGroupSizesStrs.Length - 1];
-            for (int i = 0; i < (monGroupSizes.Length); i++) { monGroupSizes[i] = int.Parse(monGroupSizesStrs[i]); }
-            ret.CurrencyGroupSizes = monGroupSizes;
-            ret.CurrencyNegativePattern = int.Parse(GetLocalizationInfo(LCID, LCType.LOCALE_INEGCURR));
-            ret.CurrencyPositivePattern = int.Parse(GetLocalizationInfo(LCID, LCType.LOCALE_ICURRENCY));
-            ret.CurrencySymbol = GetLocalizationInfo(LCID, LCType.LOCALE_SCURRENCY);
-
-            //ret.DigitSubstitution = (DigitShapes)int.Parse(GetLocalizationInfo(LCID, LCType.LOCALE_IDIGITSUBSTITUTION));
-            //ret.NativeDigits = GetLocalizationInfo(LCID, LCType.LOCALE_SNATIVEDIGITS).ToCharArray();
-            ret.NegativeSign = GetLocalizationInfo(LCID, LCType.LOCALE_SNEGATIVESIGN);
-            ret.NumberDecimalDigits = int.Parse(GetLocalizationInfo(LCID, LCType.LOCALE_IDIGITS));
-            ret.NumberDecimalSeparator = GetLocalizationInfo(LCID, LCType.LOCALE_SDECIMAL);
-            ret.NumberGroupSeparator = GetLocalizationInfo(LCID, LCType.LOCALE_STHOUSAND);
-            string[] groupSizesStrs = GetLocalizationInfo(LCID, LCType.LOCALE_SGROUPING).Split(new char[] { ';' });
-            int[] groupSizes = new int[groupSizesStrs.Length - 1];
-            for (int i = 0; i < groupSizes.Length; i++) { groupSizes[i] = int.Parse(groupSizesStrs[i]); }
-            ret.NumberGroupSizes = groupSizes;
-            ret.NumberNegativePattern = int.Parse(GetLocalizationInfo(LCID, LCType.LOCALE_INEGNUMBER));
-            ret.PositiveSign = GetLocalizationInfo(LCID, LCType.LOCALE_SPOSITIVESIGN);
-            ret.PercentGroupSizes = ret.NumberGroupSizes;
-            ret.PercentGroupSeparator = ret.NumberGroupSeparator;
-            ret.PercentDecimalSeparator = ret.NumberDecimalSeparator;
-            ret.PercentDecimalDigits = ret.NumberDecimalDigits;
-            if (string.IsNullOrEmpty(ret.PositiveSign)) ret.PositiveSign = "+";
-            if (Utilities.IsWin7OrLater)
-            {
-                //new in Win7
-                ret.PercentSymbol = GetLocalizationInfo(LCID, LCType.LOCALE_SPERCENT);
-                ret.PercentPositivePattern = int.Parse(GetLocalizationInfo(LCID, LCType.LOCALE_IPOSITIVEPERCENT));
-                ret.PercentNegativePattern = int.Parse(GetLocalizationInfo(LCID, LCType.LOCALE_INEGATIVEPERCENT));
-            }
-            return ret;
-        }
-
-        [SecuritySafeCritical]
-        private static unsafe string OSNumberToStringMac(IntPtr n, string s, CultureInfo ci, CFNumberType numType, object o)
-        {
-#if REMOVE
-            if (string.IsNullOrEmpty(s)) s = "G";
-            IntPtr cfLocale = IntPtr.Zero;
-            IntPtr cfLocaleName = IntPtr.Zero;
-            if (ci == null)
-            {
-                cfLocale = CFLocaleCopyCurrent();
-                ci = Utilities.CurrentCulture;
-            }
-            else
-            {
-                cfLocaleName = CFStringCreateWithCharacters(IntPtr.Zero, ci.Name, ci.Name.Length);
-                cfLocale = CFLocaleCreate(IntPtr.Zero, cfLocaleName);
-            }
-            IntPtr cfNumber = CFNumberCreate(IntPtr.Zero, numType, n);
-            IntPtr cfFormat = IntPtr.Zero;
-
-            int formatLen = 0;
-
-            if (s.Length > 1)
-            {
-                formatLen = int.Parse(s.Substring(1));
-            }
-            if (s[0] == 'Y')
-            {
-                int dotLoc = double.Parse(o.ToString()).ToString(CultureInfo.InvariantCulture).Trim('-').IndexOf('.');
-                if (dotLoc == -1) formatLen = 0;
-                else
-                {
-                    string subStr = double.Parse(o.ToString()).ToString(CultureInfo.InvariantCulture).Trim('-').Substring(dotLoc + 1);
-                    formatLen = Math.Min(formatLen - dotLoc, subStr.Length);
-                    if (s.Length == 1) formatLen = subStr.Length;
-                }
-            }
-            if (s[0] == 'Z') formatLen--;
-            if (formatLen < 0) formatLen = 0;
-
-            int round = 1;
-            IntPtr cfFormatLen = CFNumberCreate(IntPtr.Zero, CFNumberType.kCFNumberSInt32Type, new IntPtr((void*)&formatLen));
-            IntPtr cfOne = CFNumberCreate(IntPtr.Zero, CFNumberType.kCFNumberSInt32Type, new IntPtr((void*)&round));
-
-            int two = 2;
-            IntPtr cfTwo = CFNumberCreate(IntPtr.Zero, CFNumberType.kCFNumberSInt32Type, new IntPtr((void*)&two));
-
-            int three = 3;
-            IntPtr cfThree = CFNumberCreate(IntPtr.Zero, CFNumberType.kCFNumberSInt32Type, new IntPtr((void*)&three));
-
-            int zero = 0;
-            IntPtr cfZero = CFNumberCreate(IntPtr.Zero, CFNumberType.kCFNumberSInt32Type, new IntPtr((void*)&zero));
-
-            int six = 6;
-            IntPtr cfSix = CFNumberCreate(IntPtr.Zero, CFNumberType.kCFNumberSInt32Type, new IntPtr((void*)&six));
-
-            int numberDecimalDigit = ci.NumberFormat.NumberDecimalDigits;
-            IntPtr cfNumberDecimalDigits = CFNumberCreate(IntPtr.Zero, CFNumberType.kCFNumberSInt32Type, new IntPtr((void*)&numberDecimalDigit));
-
-            switch (s[0].ToString().ToUpper())
-            //' switch (s[0].ToString().ToUpper(CultureInfo.InvariantCulture))
-            {
-                case "P":
-                    cfFormat = CFNumberFormatterCreate(IntPtr.Zero, cfLocale, CFNumberFormatterStyle.kCFNumberFormatterPercentStyle);
-                    if (formatLen > 0)
-                    {
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMaxFractionDigits"), cfFormatLen);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinFractionDigits"), cfFormatLen);
-                    }
-                    break;
-                case "D":
-                    cfFormat = CFNumberFormatterCreate(IntPtr.Zero, cfLocale, CFNumberFormatterStyle.kCFNumberFormatterDecimalStyle);
-                    CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterUseGroupingSeparator"), IntPtr.Zero);
-                    CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinIntegerDigits"), cfFormatLen);
-                    break;
-                case "e":
-                    return OSNumberToStringMac(n, s, ci, numType, o).ToLower();
-                    //' return OSNumberToStringMac(n, s, ci, numType, o).ToLower(CultureInfo.InvariantCulture);
-                case "E":
-                    cfFormat = CFNumberFormatterCreate(IntPtr.Zero, cfLocale, CFNumberFormatterStyle.kCFNumberFormatterScientificStyle);
-                    if (formatLen > 0)
-                    {
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMaxFractionDigits"), cfFormatLen);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinFractionDigits"), cfFormatLen);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinIntegerDigits"), cfOne);
-                    }
-                    else
-                    {
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMaxFractionDigits"), cfSix);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinFractionDigits"), cfSix);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinIntegerDigits"), cfOne);
-                    }
-                    break;
-                case "C":
-                    cfFormat = CFNumberFormatterCreate(IntPtr.Zero, cfLocale, CFNumberFormatterStyle.kCFNumberFormatterCurrencyStyle);
-                    if (formatLen > 0)
-                    {
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMaxFractionDigits"), cfFormatLen);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinFractionDigits"), cfFormatLen);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinIntegerDigits"), cfOne);
-                    }
-                    break;
-                case "F":
-                    cfFormat = CFNumberFormatterCreate(IntPtr.Zero, cfLocale, CFNumberFormatterStyle.kCFNumberFormatterNoStyle);
-                    if (formatLen > 0)
-                    {
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMaxFractionDigits"), cfFormatLen);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinFractionDigits"), cfFormatLen);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinIntegerDigits"), cfOne);
-                    }
-                    else
-                    {
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMaxFractionDigits"), cfNumberDecimalDigits);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinFractionDigits"), cfNumberDecimalDigits);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinIntegerDigits"), cfOne);
-                    }
-                    break;
-                case "N":
-                    cfFormat = CFNumberFormatterCreate(IntPtr.Zero, cfLocale, CFNumberFormatterStyle.kCFNumberFormatterDecimalStyle);
-                    if (formatLen > 0)
-                    {
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMaxFractionDigits"), cfFormatLen);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinFractionDigits"), cfFormatLen);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinIntegerDigits"), cfOne);
-                    }
-                    else
-                    {
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinFractionDigits"), cfNumberDecimalDigits);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMaxFractionDigits"), cfNumberDecimalDigits);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinIntegerDigits"), cfOne);
-                    }
-                    break;
-                case "G":
-                    if (IsIntType(numType))
-return OSNumberToStringMac(n, s.ToUpper().Replace('G', 'D'), ci, numType, o); ;
-                        //' return OSNumberToStringMac(n, s.ToUpper(CultureInfo.InvariantCulture).Replace('G', 'D'), ci, numType, o); ;
-
-                    string zReplace = OSNumberToStringMac(n, s.ToUpper().Replace('G', 'Z'), ci, numType, o);
-                    string yReplace = OSNumberToStringMac(n, s.ToUpper().Replace('G', 'Y'), ci, numType, o);
-                    //' string zReplace = OSNumberToStringMac(n, s.ToUpper(CultureInfo.InvariantCulture).Replace('G', 'Z'), ci, numType, o);
-                    //' string yReplace = OSNumberToStringMac(n, s.ToUpper(CultureInfo.InvariantCulture).Replace('G', 'Y'), ci, numType, o);
-                    if ((numType == CFNumberType.kCFNumberDoubleType) && (yReplace.Trim(ci.NumberFormat.NegativeSign.ToCharArray()).Replace(ci.NumberFormat.NumberDecimalSeparator, "").Trim('0').Length > 15)) return zReplace;
-                    if ((numType == CFNumberType.kCFNumberFloat32Type) && (yReplace.Trim(ci.NumberFormat.NegativeSign.ToCharArray()).Replace(ci.NumberFormat.NumberDecimalSeparator, "").Trim('0').Length > 7)) return zReplace;
-
-                    if (zReplace.Length < yReplace.Length) return zReplace;
-                    return yReplace;
-                case "X":
-                    // TODO
-                    throw new NotSupportedException("GlobLocHelper does not currently handle hex formatting.");
-                case "Y":
-                    cfFormat = CFNumberFormatterCreate(IntPtr.Zero, cfLocale, CFNumberFormatterStyle.kCFNumberFormatterDecimalStyle);
-                    CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterUseGroupingSeparator"), IntPtr.Zero);
-                    if (s.Length > 1 || formatLen > 0)
-                    {
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinFractionDigits"), cfFormatLen);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMaxFractionDigits"), cfFormatLen);
-                    }
-                    else
-                    {
-                        int largeNum = (numType == CFNumberType.kCFNumberFloat32Type) ? 7 : 15;
-                        IntPtr cfLargeNum = CFNumberCreate(IntPtr.Zero, CFNumberType.kCFNumberSInt32Type, new IntPtr((void*)&largeNum));
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMaxFractionDigits"), cfLargeNum);
-                        if (cfLargeNum != IntPtr.Zero)
-                            CFRelease(cfLargeNum);
-                    }
-                    break;
-                case "Z":
-                    cfFormat = CFNumberFormatterCreate(IntPtr.Zero, cfLocale, CFNumberFormatterStyle.kCFNumberFormatterScientificStyle);
-
-                    if (s.Length > 1 || formatLen > 0)
-                    {
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinFractionDigits"), cfFormatLen);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMaxFractionDigits"), cfFormatLen);
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMinIntegerDigits"), cfOne);
-                    }
-                    else
-                    {
-                        int largeNum = (numType == CFNumberType.kCFNumberFloat32Type) ? 7 : 15;
-                        IntPtr cfLargeNum = CFNumberCreate(IntPtr.Zero, CFNumberType.kCFNumberSInt32Type, new IntPtr((void*)&largeNum));
-                        CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMaxFractionDigits"), cfLargeNum);
-                        if (cfLargeNum != IntPtr.Zero)
-                            CFRelease(cfLargeNum);
-                    }
-                    break;
-                case "R":
-                    cfFormat = CFNumberFormatterCreate(IntPtr.Zero, cfLocale, CFNumberFormatterStyle.kCFNumberFormatterDecimalStyle);
-
-                    int precision = (numType == CFNumberType.kCFNumberDoubleType) ? 15 : 7;
-                    IntPtr cfPrecision = CFNumberCreate(IntPtr.Zero, CFNumberType.kCFNumberSInt32Type, new IntPtr((void*)&precision));
-                    CFNumberFormatterSetProperty(cfFormat, GetCFString("kCFNumberFormatterMaxFractionDigits"), cfPrecision);
-                    if (cfPrecision != IntPtr.Zero)
-                        CFRelease(cfPrecision);
-
-                    break;
-                default:
-                    cfFormat = CFNumberFormatterCreate(IntPtr.Zero, cfLocale, CFNumberFormatterStyle.kCFNumberFormatterNoStyle);
-                    break;
-            }
-
-            IntPtr cfReturn = CFNumberFormatterCreateStringWithNumber(IntPtr.Zero, cfFormat, cfNumber);
-
-            int newLength = CFStringGetLength(cfReturn);
-            CFRange cfRange = new CFRange();
-            cfRange.x = 0;
-            cfRange.y = newLength;
-
-            StringBuilder sb = new StringBuilder(newLength);
-            CFStringGetCharacters(cfReturn, cfRange, sb);
-            string ret = sb.ToString().Substring(0, newLength);
-            if (s[0] == 'e' || s[0] == 'g') ret = ret.Replace('E', 'e');
-
-            if (cfOne != IntPtr.Zero)
-                CFRelease(cfOne);
-            if (cfThree != IntPtr.Zero)
-                CFRelease(cfThree);
-            if (cfFormatLen != IntPtr.Zero)
-                CFRelease(cfFormatLen);
-            if (cfReturn != IntPtr.Zero)
-                CFRelease(cfReturn);
-            if (cfLocaleName != IntPtr.Zero)
-                CFRelease(cfLocaleName);
-            if (cfLocale != IntPtr.Zero)
-                CFRelease(cfLocale);
-            if (cfFormat != IntPtr.Zero)
-                CFRelease(cfFormat);
-            if (cfNumber != IntPtr.Zero)
-                CFRelease(cfNumber);
-            if (cfTwo != IntPtr.Zero)
-                CFRelease(cfTwo);
-            if (cfZero != IntPtr.Zero)
-                CFRelease(cfZero);
-            if (cfSix != IntPtr.Zero)
-                CFRelease(cfSix);
-            if (cfNumberDecimalDigits != IntPtr.Zero)
-                CFRelease(cfNumberDecimalDigits);
-            return ret;
-#else
-            throw new NotImplementedException();
-#endif
-        }
-        #endregion
-        #region DateTime Formatting Methods
-        public static string OSDateToString(DateTime date, string format)
-        {
-            return OSDateToString(date, format, Utilities.CurrentCulture.DateTimeFormat, Utilities.CurrentCulture);
-        }
-
-        public static string OSDateToString(DateTime date, string format, CultureInfo ci)
-        {
-            return OSDateToString(date, format, ci, DateTimeStyles.None);
-        }
-
-        public static string OSDateToString(DateTime date)
-        {
-            return OSDateToString(date, "G");
-        }
-
-        public static string OSDateToString(DateTime date, string format, CultureInfo ci, DateTimeStyles styles)
-        {
-            if (ci == null) ci = Utilities.CurrentCulture;
-            if ((styles & DateTimeStyles.AssumeLocal) == DateTimeStyles.AssumeLocal)
-            {
-                date = new DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, date.Millisecond, DateTimeKind.Local);
-            }
-            if ((styles & DateTimeStyles.AssumeUniversal) == DateTimeStyles.AssumeUniversal)
-            {
-                date = new DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, date.Millisecond, DateTimeKind.Utc);
-            }
-            if ((styles & DateTimeStyles.AdjustToUniversal) == DateTimeStyles.AdjustToUniversal)
-            {
-                date = date.ToUniversalTime();
-            }
-            return OSDateToString(date, format, ci.DateTimeFormat, ci);
-        }
-
-
-        [SecuritySafeCritical]
-        public static string OSDateToString(DateTime date, string format, DateTimeFormatInfo dtfi, CultureInfo cultInfo)
-        {
-            string ret = string.Empty;
-
-#if TEMP
-            PropertyInfo cultureName = null;
-
-            foreach (var pi in typeof(DateTimeFormatInfo).GetTypeInfo().DeclaredProperties)
-            {
-                if (pi.Name == "CultureName") cultureName = pi;
-            }
-
-            if (cultureName == null) throw new ArgumentException("Can't find CultureName property on DateTimeFormatInfo");
-
-            // PropertyInfo cultureName = typeof(DateTimeFormatInfo).GetProperty("CultureName", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
-            string culture = (string)cultureName.GetValue(dtfi, null);
-#endif
-            String culture = cultInfo.Name;
-            StringBuilder dateSB = new StringBuilder();
-            StringBuilder timeSB = new StringBuilder();
-            string connector = " ";
-            bool useDate = false;
-            bool useTime = false;
-            int locale = LCIDFromCultureInfo(new CultureInfo(culture));
-            string formatDate = null;
-            string formatTime = null;
-            TimeFormatFlags timeFlag = 0;
-            DateFormatFlags dateFlag = 0;
-
-            #region Format switch
-            switch (format)
-            {
-                case "d":
-                    useDate = true;
-                    dateFlag |= DateFormatFlags.DATE_SHORTDATE;
-                    break;
-                case "D":
-                    useDate = true;
-                    dateFlag |= DateFormatFlags.DATE_LONGDATE;
-                    break;
-                case "f":
-                    useDate = true; useTime = true;
-                    dateFlag |= DateFormatFlags.DATE_LONGDATE;
-                    timeFlag |= TimeFormatFlags.TIME_SHORTTIME;
-                    break;
-                case "F":
-                    useDate = true; useTime = true;
-                    dateFlag |= DateFormatFlags.DATE_LONGDATE;
-                    timeFlag |= TimeFormatFlags.TIME_LONGTIME;
-                    break;
-                case "g":
-                    useDate = true; useTime = true;
-                    dateFlag |= DateFormatFlags.DATE_SHORTDATE;
-                    timeFlag |= TimeFormatFlags.TIME_SHORTTIME;
-                    break;
-                case "G":
-                    useDate = true; useTime = true;
-                    dateFlag |= DateFormatFlags.DATE_SHORTDATE;
-                    timeFlag |= TimeFormatFlags.TIME_LONGTIME;
-                    break;
-                case "m":
-                case "M":
-                    formatDate = "MMMM dd";
-                    break;
-                case "y":
-                case "Y":
-                    useDate = true;
-                    dateFlag |= DateFormatFlags.DATE_YEARMONTH;
-                    break;
-                case "s":
-                    formatDate = "yyyy'-'MM'-'dd'";
-                    formatTime = "HH':'mm':'ss";
-                    connector = "T";
-                    break;
-                case "R":
-                case "r":
-                    formatDate = "ddd, dd MMM yyyy";
-                    formatTime = "HH':'mm':'ss 'GMT'";
-                    break;
-                case "u":
-                    formatDate = "yyyy'-'MM'-'dd";
-                    formatTime = "HH':'mm':'ss'Z'";
-                    break;
-                case "U":
-                    date = date.ToUniversalTime();
-                    useDate = true; useTime = true;
-                    dateFlag |= DateFormatFlags.DATE_LONGDATE;
-                    timeFlag |= TimeFormatFlags.TIME_LONGTIME;
-                    break;
-                case "o":
-                case "O":
-                    formatDate = "yyyy-MM-dd";
-                    formatTime = "HH:mm:ss.fffffffK";
-                    connector = "T";
-                    break;
-                case "t":
-                    useTime = true;
-                    //timeFlag |= TimeFormatFlags.TIME_LONGTIME;  // By design :( DDT #1472
-                    timeFlag |= TimeFormatFlags.TIME_SHORTTIME;  // Fixed on SL FC 75
-                    break;
-                case "T":
-                    useTime = true;
-                    timeFlag |= TimeFormatFlags.TIME_LONGTIME;
-                    break;
-                default:
-                    connector = "";
-                    format = format.Replace("%", string.Empty);
-                    int pos = 0;
-                    while (pos < format.Length && format[pos] != 'h' && format[pos] != 'H' && format[pos] != 'm' && format[pos] != 's'
-                        && format[pos] != 'f' && format[pos] != 'K' && format[pos] != 'F' && format[pos] != 't' && format[pos] != 'z')
-                        pos++;
-                    if (pos == 0)
-                    {
-                        formatTime = format;
-                    }
-                    else if (pos < format.Length)
-                    {
-                        formatDate = format.Substring(0, pos);
-                        formatTime = format.Substring(pos);
-                    }
-                    else
-                    {
-                        formatDate = format;
-                    }
-                    break;
-            }
-            #endregion
-
-            SystemTime st = new SystemTime(date);
-            if (!string.IsNullOrEmpty(formatDate) || !string.IsNullOrEmpty(formatTime))
-            {
-                ret = string.Empty;
-                if (!string.IsNullOrEmpty(formatDate))
-                {
-                    int cap = GetDateFormatW((uint)locale, 0, ref st, formatDate, dateSB, 0);
-                    dateSB = new StringBuilder(cap);
-                    GetDateFormatW((uint)locale, 0, ref st, formatDate, dateSB, cap);
-                    ret = dateSB.ToString();
-                }
-                if (!string.IsNullOrEmpty(formatDate) && !string.IsNullOrEmpty(formatTime))
-                {
-                    ret = ret + connector;
-                }
-                if (!string.IsNullOrEmpty(formatTime))
-                {
-                    while (formatTime.Contains("f"))
-                    {
-                        int beginFS = formatTime.IndexOf("f");
-                        int fCount = 0;
-                        while (beginFS < formatTime.Length && formatTime[beginFS] == 'f') { fCount++; beginFS++; }
-                        long fraction = date.Ticks % 10000000;
-                        string fractionalString = fraction.ToString().Substring(0, Math.Min(fCount, fraction.ToString().Length));
-                        if (fCount > fractionalString.Length) fractionalString = fractionalString + new string('0', fCount - fractionalString.Length);
-                        formatTime = formatTime.Replace(new string('f', fCount), fractionalString);
-                    }
-                    if (formatTime.Contains("K"))
-                    {
-                        string tz = null;
-                        switch (date.Kind)
-                        {
-                            case DateTimeKind.Local:
-                                TimeSpan offset = TimeZoneInfo.Local.GetUtcOffset(date);
-                                if (offset.Ticks >= 0)
-                                {
-                                    tz = String.Format(CultureInfo.InvariantCulture, "+{0:00}:{1:00}", offset.Hours, offset.Minutes);
-                                }
-                                else
-                                {
-                                    tz = String.Format(CultureInfo.InvariantCulture, "-{0:00}:{1:00}", -offset.Hours, -offset.Minutes);
-                                }
-                                break;
-                            case DateTimeKind.Utc:
-                                tz = "Z";
-                                break;
-                            default:
-                                tz = string.Empty;
-                                break;
-                        }
-                        formatTime = formatTime.Replace("K", tz);
-                    }
-                    int cap = GetTimeFormatW((uint)locale, 0, ref st, formatTime, timeSB, 0);
-                    timeSB = new StringBuilder(cap);
-                    GetTimeFormatW((uint)locale, 0, ref st, formatTime, timeSB, cap);
-                    ret = ret + timeSB.ToString();
-                }
-            }
-            else
-            {
-                ret = string.Empty;
-                if (useDate)
-                {
-                    int cap = GetDateFormatW((uint)locale, (uint)dateFlag, ref st, null, dateSB, 0);
-                    dateSB = new StringBuilder(cap);
-                    GetDateFormatW((uint)locale, (uint)dateFlag, ref st, null, dateSB, cap);
-                    ret = dateSB.ToString();
-                }
-                if (useDate && useTime) ret = ret + connector;
-                if (useTime)
-                {
-                    int cap = GetTimeFormatW((uint)locale, (uint)timeFlag, ref st, null, timeSB, 0);
-                    timeSB = new StringBuilder(cap);
-                    GetTimeFormatW((uint)locale, (uint)timeFlag, ref st, null, timeSB, cap);
-                    ret = ret + timeSB.ToString();
-                }
-            }
-
-
-            if (string.IsNullOrEmpty(ret)) throw new InvalidOperationException("Formatted DateTime unexpectedly empty\nDate: " + date.ToString() + "\nFormat: " + format);
-            return ret;
-        }
-        #endregion
-
-        #region Retrieving DateTimeFormats
-        public static string[] OSGetDateTimeFormats(DateTime dt)
-        {
-            return OSGetDateTimeFormats(dt, Utilities.CurrentCulture.DateTimeFormat);
-        }
-
-        public static string[] OSGetDateTimeFormats(DateTime dt, char c)
-        {
-            return OSGetDateTimeFormats(dt, c, Utilities.CurrentCulture.DateTimeFormat);
-        }
-
-        public static string[] OSGetDateTimeFormats(DateTime dt, DateTimeFormatInfo dtfi)
-        {
-            List<string> ret = new List<string>();
-            foreach (char c in allStandardFormats)
-            {
-                ret.AddRange(OSGetDateTimeFormats(dt, c, dtfi));
-            }
-            return ret.ToArray();
-        }
-
-        [SecuritySafeCritical]
-        public static string[] OSGetDateTimeFormats(DateTime dt, char format, DateTimeFormatInfo dtfi)
-        {
-#if TEMP
-            string[] results = null;
-            string[] formats = null;
-            ResetDatesAndTimes();
-
-            PropertyInfo cultureName = typeof(DateTimeFormatInfo).GetProperty("CultureName", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
-            string cultureStr = (string)cultureName.GetValue(dtfi, null);
-            uint culture = (uint)LCIDFromCultureName(cultureStr);
-
-            if (Utilities.IsWindows)
-            {
-                switch (format)
-                {
-                    case 'd':
-                        EnumDateFormats(new DateTimeFormatDelegate(GetDateFormats), culture, (uint)(DateFormatFlags.DATE_SHORTDATE));
-                        results = new string[Dates.Count];
-                        for (int i = 0; i < Dates.Count; i++) { results[i] = dt.ToString(Dates[i], dtfi); }
-                        break;
-                    case 'D':
-                        EnumDateFormats(new DateTimeFormatDelegate(GetDateFormats), culture, (uint)(DateFormatFlags.DATE_LONGDATE));
-                        results = new string[Dates.Count];
-                        for (int i = 0; i < Dates.Count; i++) { results[i] = dt.ToString(Dates[i], dtfi); }
-                        break;
-                    case 'f':
-                    case 'F':
-                        EnumDateFormats(new DateTimeFormatDelegate(GetDateFormats), culture, (uint)(DateFormatFlags.DATE_LONGDATE));
-                        EnumTimeFormats(new DateTimeFormatDelegate(GetTimeFormats), culture, (uint)(TimeFormatFlags.TIME_LONGTIME));
-                        formats = ComposeDatesAndTimes();
-                        results = new string[formats.Length];
-                        for (int i = 0; i < formats.Length; i++) { results[i] = dt.ToString(formats[i], dtfi); }
-                        break;
-                    case 'g':
-                    case 'G':
-                        EnumDateFormats(new DateTimeFormatDelegate(GetDateFormats), culture, (uint)(DateFormatFlags.DATE_SHORTDATE));
-                        EnumTimeFormats(new DateTimeFormatDelegate(GetTimeFormats), culture, (uint)(TimeFormatFlags.TIME_LONGTIME));
-                        formats = ComposeDatesAndTimes();
-                        results = new string[formats.Length];
-                        for (int i = 0; i < formats.Length; i++) { results[i] = dt.ToString(formats[i], dtfi); }
-                        break;
-                    case 't':
-                    case 'T':
-                        EnumTimeFormats(new DateTimeFormatDelegate(GetTimeFormats), culture, (uint)(TimeFormatFlags.TIME_LONGTIME));
-                        results = new string[Times.Count];
-                        for (int i = 0; i < Times.Count; i++) { results[i] = dt.ToString(Times[i], dtfi); }
-                        break;
-                    case 'y':
-                    case 'Y':
-                        EnumDateFormats(new DateTimeFormatDelegate(GetDateFormats), culture, (uint)(DateFormatFlags.DATE_YEARMONTH));
-                        results = new string[Dates.Count];
-                        for (int i = 0; i < Dates.Count; i++) { results[i] = dt.ToString(Dates[i], dtfi); }
-                        break;
-                    case 'U':
-                        DateTime universalTime = dt.ToUniversalTime();
-                        return OSGetDateTimeFormats(universalTime, 'F', dtfi);
-                    case 'm':
-                    case 'M':
-                    case 'r':
-                    case 'R':
-                    case 'o':
-                    case 'O':
-                    case 's':
-                    case 'u':
-                        results = new String[] { OSDateToString(dt, format.ToString(), dtfi) };
-                        break;
-                }
-            }
-            else
-            {
-                // Work around a Mac OS bug that only is present in local time without custom format strings (so not O and s)
-                if (format != 's' && char.ToUpper(format, CultureInfo.InvariantCulture) != 'O' && dt.IsDaylightSavingTime()) dt = dt - new TimeSpan(1, 0, 0);
-                switch (format)
-                {
-                    case 'd':
-                        results = new string[1];
-                        results[0] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterShortStyle, CFDateFormatterStyle.kCFDateFormatterNoStyle);
-                        break;
-                    case 'D':
-                        results = new string[3];
-                        results[0] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterFullStyle, CFDateFormatterStyle.kCFDateFormatterNoStyle);
-                        results[1] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterLongStyle, CFDateFormatterStyle.kCFDateFormatterNoStyle);
-                        results[2] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterMediumStyle, CFDateFormatterStyle.kCFDateFormatterNoStyle);
-                        break;
-                    case 'f':
-                    case 'F':
-                        results = new string[12];
-                        results[0] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterFullStyle, CFDateFormatterStyle.kCFDateFormatterFullStyle);
-                        results[1] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterFullStyle, CFDateFormatterStyle.kCFDateFormatterLongStyle);
-                        results[2] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterFullStyle, CFDateFormatterStyle.kCFDateFormatterMediumStyle);
-                        results[3] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterFullStyle, CFDateFormatterStyle.kCFDateFormatterShortStyle);
-                        results[4] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterLongStyle, CFDateFormatterStyle.kCFDateFormatterFullStyle);
-                        results[5] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterLongStyle, CFDateFormatterStyle.kCFDateFormatterLongStyle);
-                        results[6] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterLongStyle, CFDateFormatterStyle.kCFDateFormatterMediumStyle);
-                        results[7] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterLongStyle, CFDateFormatterStyle.kCFDateFormatterShortStyle);
-                        results[8] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterMediumStyle, CFDateFormatterStyle.kCFDateFormatterFullStyle);
-                        results[9] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterMediumStyle, CFDateFormatterStyle.kCFDateFormatterLongStyle);
-                        results[10] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterMediumStyle, CFDateFormatterStyle.kCFDateFormatterMediumStyle);
-                        results[11] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterMediumStyle, CFDateFormatterStyle.kCFDateFormatterShortStyle);
-                        break;
-                    case 'g':
-                    case 'G':
-                        results = new string[4];
-                        results[0] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterShortStyle, CFDateFormatterStyle.kCFDateFormatterFullStyle);
-                        results[1] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterShortStyle, CFDateFormatterStyle.kCFDateFormatterLongStyle);
-                        results[2] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterShortStyle, CFDateFormatterStyle.kCFDateFormatterMediumStyle);
-                        results[3] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterShortStyle, CFDateFormatterStyle.kCFDateFormatterShortStyle);
-                        break;
-                    case 't':
-                    case 'T':
-                        results = new string[4];
-                        results[0] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterNoStyle, CFDateFormatterStyle.kCFDateFormatterFullStyle);
-                        results[1] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterNoStyle, CFDateFormatterStyle.kCFDateFormatterLongStyle);
-                        results[2] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterNoStyle, CFDateFormatterStyle.kCFDateFormatterMediumStyle);
-                        results[3] = GetMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterNoStyle, CFDateFormatterStyle.kCFDateFormatterShortStyle);
-                        break;
-                    case 'U':
-                        results = new string[12];
-                        results[0] = GetUnivMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterFullStyle, CFDateFormatterStyle.kCFDateFormatterFullStyle);
-                        results[1] = GetUnivMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterFullStyle, CFDateFormatterStyle.kCFDateFormatterLongStyle);
-                        results[2] = GetUnivMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterFullStyle, CFDateFormatterStyle.kCFDateFormatterMediumStyle);
-                        results[3] = GetUnivMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterFullStyle, CFDateFormatterStyle.kCFDateFormatterShortStyle);
-                        results[4] = GetUnivMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterLongStyle, CFDateFormatterStyle.kCFDateFormatterFullStyle);
-                        results[5] = GetUnivMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterLongStyle, CFDateFormatterStyle.kCFDateFormatterLongStyle);
-                        results[6] = GetUnivMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterLongStyle, CFDateFormatterStyle.kCFDateFormatterMediumStyle);
-                        results[7] = GetUnivMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterLongStyle, CFDateFormatterStyle.kCFDateFormatterShortStyle);
-                        results[8] = GetUnivMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterMediumStyle, CFDateFormatterStyle.kCFDateFormatterFullStyle);
-                        results[9] = GetUnivMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterMediumStyle, CFDateFormatterStyle.kCFDateFormatterLongStyle);
-                        results[10] = GetUnivMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterMediumStyle, CFDateFormatterStyle.kCFDateFormatterMediumStyle);
-                        results[11] = GetUnivMacDateTimeString(dt, cultureStr, CFDateFormatterStyle.kCFDateFormatterMediumStyle, CFDateFormatterStyle.kCFDateFormatterShortStyle);
-                        break;
-                    case 'y':
-                    case 'Y':
-                    case 'm':
-                    case 'M':
-                    case 'r':
-                    case 'R':
-                    case 'o':
-                    case 'O':
-                    case 's':
-                    case 'u':
-                        results = new String[] { OSDateToString(dt, format.ToString(), dtfi) };
-                        break;
-                }
-            }
-
-            return results;
-#else
-            throw new NotImplementedException();
-#endif
-        }
-        #endregion
-
-        #region Casing Methods
-        public static char OSToUpper(char c) { return OSToUpper(c.ToString())[0]; }
-
-        public static char OSToUpper(char c, CultureInfo ci) { return OSToUpper(c.ToString(), ci)[0]; }
-
-        public static string OSToUpper(string str)
-        {
-            return OSToUpper(str, null);
-        }
-
-        [SecuritySafeCritical]
-        public static string OSToUpper(string str, CultureInfo ci)
-        {
-            if (string.IsNullOrEmpty(str)) return str;
-            string output = new string(' ', str.Length);
-            int lcid = LCIDFromCultureInfo(ci); // ci.LCID;
-            int length = str.Length;
-
-            int nativeFlags = LCMAP_UPPERCASE;
-            if (ci != CultureInfo.InvariantCulture) nativeFlags |= LCMAP_LINGUISTIC_CASING;
-
-            int retValue = 0;
-            if (Utilities.IsVistaOrLater)
-                retValue = LCMapStringEx(ci == null ? Utilities.CurrentCulture.ToString() : ci.ToString(), nativeFlags, str, length, output, length, (IntPtr)null, (IntPtr)null, IntPtr.Zero);
-            else
-                retValue = LCMapStringW(lcid, nativeFlags, str, length, output, length);
-
-            if (retValue == 0) throw new InvalidOperationException("Unexpected return value from LCMapStringW: " + retValue.ToString());
-            return output;
-        }
-
-        public static char OSToLower(char c) { return OSToLower(c.ToString())[0]; }
-
-        public static char OSToLower(char c, CultureInfo ci) { return OSToLower(c.ToString(), ci)[0]; }
-
-        public static string OSToLower(string str)
-        {
-            return OSToLower(str, null);
-        }
-
-        [SecuritySafeCritical]
-        public static string OSToLower(string str, CultureInfo ci)
-        {
-            if (str.Contains("\0"))
-            {
-                string[] subStrs = str.Split(new char[] { '\0' });
-                StringBuilder sbOut = new StringBuilder(OSToLower(subStrs[0], ci));
-                for (int i = 1; i < subStrs.Length; i++)
-                {
-                    sbOut.Append("\0");
-                    sbOut.Append(OSToLower(subStrs[i], ci));
-                }
-                return sbOut.ToString();
-            }
-
-            if (string.IsNullOrEmpty(str)) return str;
-            string output = new string(' ', str.Length);
-            int lcid = LCIDFromCultureInfo(ci); // ci.LCID;
-            int length = str.Length;
-
-            int nativeFlags = LCMAP_LOWERCASE;
-            if (ci != CultureInfo.InvariantCulture) nativeFlags |= LCMAP_LINGUISTIC_CASING;
-
-            int retValue = 0;
-            if (Utilities.IsVistaOrLater)
-                retValue = LCMapStringEx(ci == null ? Utilities.CurrentCulture.ToString() : ci.ToString(), nativeFlags, str, length, output, length, (IntPtr)null, (IntPtr)null, IntPtr.Zero);
-            else
-                retValue = LCMapStringW(lcid, nativeFlags, str, length, output, length);
-
-            if (retValue == 0) throw new InvalidOperationException("Unexpected return value from LCMapStringW/LCMapStringEx: " + retValue.ToString());
-            return output;
-        }
-        #endregion
-
-        #region String Comparing, Indexing, Prefix, and Suffix Methods
-        public static int OSIndexOfAny(string str1, char[] chars)
-        {
-            int ret = str1.Length + 1;
-            foreach (char c in chars)
-            {
-                int val = OSIndexOf(str1, c);
-                if (val > -1 && val < ret) ret = val;
-            }
-            if (ret == str1.Length + 1) ret = -1;
-            return ret;
-        }
-
-        public static int OSIndexOfAny(string str1, char[] chars, int index)
-        {
-            int ret = str1.Length + 1;
-            foreach (char c in chars)
-            {
-                int val = OSIndexOf(str1, c, index);
-                if (val > -1 && val < ret) ret = val;
-            }
-            if (ret == str1.Length + 1) ret = -1;
-            return ret;
-        }
-
-        public static int OSIndexOfAny(string str1, char[] chars, int index, int count)
-        {
-            int ret = str1.Length + 1;
-            foreach (char c in chars)
-            {
-                int val = OSIndexOf(str1, c, index, count);
-                if (val > -1 && val < ret) ret = val;
-            }
-            if (ret == str1.Length + 1) ret = -1;
-            return ret;
-        }
-
-        public static int OSIndexOf(string str1, string str2, StringComparison sc)
-        {
-            switch (sc)
-            {
-                case StringComparison.CurrentCulture:
-                    return OSIndexOf(Utilities.CurrentCulture, str1, str2, CompareOptions.None);
-                case StringComparison.CurrentCultureIgnoreCase:
-                    return OSIndexOf(Utilities.CurrentCulture, str1, str2, CompareOptions.IgnoreCase);
-#if REMOVE
-                case StringComparison.InvariantCulture:
-                    return OSIndexOf(CultureInfo.InvariantCulture, str1, str2, CompareOptions.None);
-                case StringComparison.InvariantCultureIgnoreCase:
-                    return OSIndexOf(CultureInfo.InvariantCulture, str1, str2, CompareOptions.IgnoreCase);
-#endif
-                case StringComparison.Ordinal:
-                    return OSIndexOf(CultureInfo.InvariantCulture, str1, str2, CompareOptions.Ordinal);
-                case StringComparison.OrdinalIgnoreCase:
-                    return OSIndexOf(CultureInfo.InvariantCulture, str1, str2, CompareOptions.OrdinalIgnoreCase);
-                default:
-                    throw new NotSupportedException("Invalid StringComparison value");
-            }
-        }
-
-        public static int OSIndexOf(string str1, string str2, int index, int count)
-        {
-            return OSIndexOf(str1, str2, index, count, StringComparison.CurrentCulture);
-        }
-
-        public static int OSIndexOf(string str1, char c)
-        {
-            return OSIndexOf(str1, c.ToString(), StringComparison.CurrentCulture);
-        }
-
-        public static int OSIndexOf(string str1, char c, int index)
-        {
-            return OSIndexOf(str1, c.ToString(), index, StringComparison.CurrentCulture);
-        }
-
-        public static int OSIndexOf(string str1, char c, int index, int count)
-        {
-            return OSIndexOf(str1, c.ToString(), index, count, StringComparison.CurrentCulture);
-        }
-
-        public static int OSIndexOf(string str1, string str2)
-        {
-            return OSIndexOf(str1, str2, StringComparison.CurrentCulture);
-        }
-
-        public static int OSIndexOf(string str1, string str2, int index)
-        {
-            return OSIndexOf(str1, str2, index, StringComparison.CurrentCulture);
-        }
-
-        public static int OSIndexOf(string str1, string str2, int index, StringComparison options)
-        {
-            int ret = OSIndexOf(str1.Substring(index, str1.Length - index), str2, options);
-            if (ret == -1) return -1;
-            else return index + ret;
-        }
-
-        public static int OSIndexOf(string str1, string str2, int index, int count, StringComparison sc)
-        {
-            int ret = OSIndexOf(str1.Substring(index, count), str2, sc);
-            if (ret == -1) return -1;
-            else return index + ret;
-        }
-
-        public static int OSIndexOf(CultureInfo ci, string str1, string str2, CompareOptions options)
-        {
-            if (!Utilities.IsWindows)
-            {
-                // This hack works around a Mac OS X 10.4 bug (it incorrectly ignores nulls)
-                str1 = str1.Replace("\0", "*");
-                str2 = str2.Replace("\0", "*");
-            }
-            if (str2.Length == 0) return 0;
-            for (int i = 0; i < str1.Length; i++)
-            {
-                for (int j = Math.Max(1, str2.Length - 5); j <= Math.Min(str1.Length - i, str2.Length + 5); j++)
-                {
-                    if (0 == OSCompare(ci, str1, i, j, str2, 0, str2.Length, options)) return i;
-                }
-            }
-
-            return -1;
-        }
-
-        public static int OSLastIndexOfAny(string str1, char[] chars)
-        {
-            int ret = -1;
-            foreach (char c in chars)
-            {
-                int val = OSLastIndexOf(str1, c);
-                if (val > ret) ret = val;
-            }
-            return ret;
-        }
-
-        public static int OSLastIndexOfAny(string str1, char[] chars, int index)
-        {
-            int ret = -1; ;
-            foreach (char c in chars)
-            {
-                int val = OSLastIndexOf(str1, c, index);
-                if (val > ret) ret = val;
-            }
-            return ret;
-        }
-
-        public static int OSLastIndexOfAny(string str1, char[] chars, int index, int count)
-        {
-            int ret = -1;
-            foreach (char c in chars)
-            {
-                int val = OSLastIndexOf(str1, c, index, count);
-                if (val > ret) ret = val;
-            }
-            return ret;
-        }
-
-        public static int OSLastIndexOf(string str1, string str2, int index, int count)
-        {
-            return OSLastIndexOf(str1, str2, index, count, StringComparison.CurrentCulture);
-        }
-
-        public static int OSLastIndexOf(string str1, char c)
-        {
-            return OSLastIndexOf(str1, c.ToString(), StringComparison.Ordinal);
-        }
-
-        public static int OSLastIndexOf(string str1, char c, int index)
-        {
-            return OSLastIndexOf(str1, c.ToString(), index, StringComparison.Ordinal);
-        }
-
-        public static int OSLastIndexOf(string str1, char c, int index, int count)
-        {
-            return OSLastIndexOf(str1, c.ToString(), index, count, StringComparison.Ordinal);
-        }
-
-        public static int OSLastIndexOf(string str1, string str2)
-        {
-            return OSLastIndexOf(str1, str2, StringComparison.CurrentCulture);
-        }
-
-        public static int OSLastIndexOf(string str1, string str2, int index)
-        {
-            return OSLastIndexOf(str1, str2, index, StringComparison.CurrentCulture);
-        }
-
-        public static int OSLastIndexOf(string str1, string str2, int index, StringComparison options)
-        {
-            if (str1.Length > index && str2.Length == 0) return index;
-            return OSLastIndexOf(str1.Substring(0, Math.Min(index + 1, str1.Length)), str2, options);
-        }
-
-        public static int OSLastIndexOf(string str1, string str2, int index, int count, StringComparison sc)
-        {
-            if (index == str1.Length)
-            {
-                index = Math.Max(index - 1, 0);
-                count = Math.Max(count - 1, 0);
-            }
-
-            if (str2.Length == 0) return index;
-            int start = index - (count - 1);
-            int ret = OSLastIndexOf(str1.Substring(start), str2, count - 1, sc);
-            if (ret == -1) return -1;
-            else return start + ret;
-        }
-
-        public static int OSLastIndexOf(string str1, string str2, StringComparison sc)
-        {
-            switch (sc)
-            {
-                case StringComparison.CurrentCulture:
-                    return OSLastIndexOf(Utilities.CurrentCulture, str1, str2, CompareOptions.None);
-                case StringComparison.CurrentCultureIgnoreCase:
-                    return OSLastIndexOf(Utilities.CurrentCulture, str1, str2, CompareOptions.IgnoreCase);
-#if REMOVE
-                case StringComparison.InvariantCulture:
-                    return OSLastIndexOf(CultureInfo.InvariantCulture, str1, str2, CompareOptions.None);
-                case StringComparison.InvariantCultureIgnoreCase:
-                    return OSLastIndexOf(CultureInfo.InvariantCulture, str1, str2, CompareOptions.IgnoreCase);
-#endif
-                case StringComparison.Ordinal:
-                    return OSLastIndexOf(CultureInfo.InvariantCulture, str1, str2, CompareOptions.Ordinal);
-                case StringComparison.OrdinalIgnoreCase:
-                    return OSLastIndexOf(CultureInfo.InvariantCulture, str1, str2, CompareOptions.OrdinalIgnoreCase);
-                default:
-                    throw new NotSupportedException("Invalid StringComparison value");
-            }
-        }
-
-        public static int OSLastIndexOf(CultureInfo ci, string str1, string str2, CompareOptions options)
-        {
-            str1 = str1.Replace("\0", "*");
-            str2 = str2.Replace("\0", "*");
-            if ((str1 != null) && (str2.Length == 0)) return Math.Max(0, str1.Length - 1);
-            for (int i = str1.Length - 1; i >= 0; i--)
-            {
-                for (int j = Math.Max(1, str2.Length - 5); j <= Math.Min(str1.Length - i, str2.Length + 5); j++)
-                {
-                    if (0 == OSCompare(ci, str1, i, j, str2, 0, str2.Length, options)) return i;
-                }
-            }
-            return -1;
-        }
-
-        public static bool OSIsPrefix(string str1, string str2, StringComparison sc)
-        {
-            switch (sc)
-            {
-                case StringComparison.CurrentCulture:
-                    return OSIsPrefix(Utilities.CurrentCulture, str1, str2, CompareOptions.None);
-                case StringComparison.CurrentCultureIgnoreCase:
-                    return OSIsPrefix(Utilities.CurrentCulture, str1, str2, CompareOptions.IgnoreCase);
-#if REMOVE
-                case StringComparison.InvariantCulture:
-                    return OSIsPrefix(CultureInfo.InvariantCulture, str1, str2, CompareOptions.None);
-                case StringComparison.InvariantCultureIgnoreCase:
-                    return OSIsPrefix(CultureInfo.InvariantCulture, str1, str2, CompareOptions.IgnoreCase);
-#endif
-                case StringComparison.Ordinal:
-                    return OSIsPrefix(CultureInfo.InvariantCulture, str1, str2, CompareOptions.Ordinal);
-                case StringComparison.OrdinalIgnoreCase:
-                    return OSIsPrefix(CultureInfo.InvariantCulture, str1, str2, CompareOptions.OrdinalIgnoreCase);
-                default:
-                    throw new NotSupportedException("Invalid StringComparison value");
-            }
-        }
-
-        public static bool OSIsPrefix(CultureInfo ci, string str1, string str2, bool ignoreCase)
-        {
-            return OSIsPrefix(ci, str1, str2, ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None);
-        }
-
-        public static bool OSIsPrefix(string str1, string str2)
-        {
-            return OSIsPrefix(Utilities.CurrentCulture, str1, str2, CompareOptions.None);
-        }
-
-        public static bool OSIsPrefix(CultureInfo ci, string str1, string str2, CompareOptions options)
-        {
-            if (ci == null) ci = CultureInfo.InvariantCulture;
-            if (str2.Length == 0 && str1 != null) return true;
-            return (0 == OSIndexOf(ci, str1, str2, options));
-        }
-
-        public static bool OSIsSuffix(string str1, string str2, StringComparison sc)
-        {
-            switch (sc)
-            {
-                case StringComparison.CurrentCulture:
-                    return OSIsSuffix(Utilities.CurrentCulture, str1, str2, CompareOptions.None);
-                case StringComparison.CurrentCultureIgnoreCase:
-                    return OSIsSuffix(Utilities.CurrentCulture, str1, str2, CompareOptions.IgnoreCase);
-#if REMOVE
-                case StringComparison.InvariantCulture:
-                    return OSIsSuffix(CultureInfo.InvariantCulture, str1, str2, CompareOptions.None);
-                case StringComparison.InvariantCultureIgnoreCase:
-                    return OSIsSuffix(CultureInfo.InvariantCulture, str1, str2, CompareOptions.IgnoreCase);
-#endif
-                case StringComparison.Ordinal:
-                    return OSIsSuffix(CultureInfo.InvariantCulture, str1, str2, CompareOptions.Ordinal);
-                case StringComparison.OrdinalIgnoreCase:
-                    return OSIsSuffix(CultureInfo.InvariantCulture, str1, str2, CompareOptions.OrdinalIgnoreCase);
-                default:
-                    throw new NotSupportedException("Invalid StringComparison value");
-            }
-        }
-
-        public static bool OSIsSuffix(CultureInfo ci, string str1, string str2, bool ignoreCase)
-        {
-            return OSIsSuffix(ci, str1, str2, ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None);
-        }
-
-        public static bool OSIsSuffix(string str1, string str2)
-        {
-            return OSIsSuffix(Utilities.CurrentCulture, str1, str2, CompareOptions.None);
-        }
-
-        public static bool OSIsSuffix(CultureInfo ci, string str1, string str2, CompareOptions options)
-        {
-            if (ci == null) ci = CultureInfo.InvariantCulture;
-            if (str2.Length == 0 && str1 != null) return true;
-            for (int i = str1.Length - 1; i >= 0; i--)
-            {
-                if (0 == OSCompare(ci, str1, i, str1.Length - i, str2, 0, str2.Length, options)) return true;
-            }
-            return false;
-        }
-
-        public static int OSCompare(string str1, string str2)
-        {
-            return OSCompare(Utilities.CurrentCulture, str1, 0, str1.Length, str2, 0, str2.Length, CompareOptions.None);
-        }
-
-        public static int OSCompare(string str1, string str2, bool ignoreCase)
-        {
-            return OSCompare(Utilities.CurrentCulture, str1, 0, str1.Length, str2, 0, str2.Length, (ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None));
-        }
-
-        public static int OSCompare(string str1, string str2, StringComparison sc)
-        {
-            return OSCompare(str1, 0, str1.Length, str2, 0, str2.Length, sc);
-        }
-
-        public static int OSCompare(string str1, string str2, CultureInfo ci)
-        {
-            return OSCompare(ci, str1, 0, str1.Length, str2, 0, str2.Length, CompareOptions.None);
-        }
-
-        public static int OSCompare(string str1, string str2, bool ignoreCase, CultureInfo ci)
-        {
-            return OSCompare(ci, str1, 0, str1.Length, str2, 0, str2.Length, (ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None));
-        }
-
-        public static int OSCompare(string str1, int offset1, string str2, int offset2, int length)
-        {
-            return OSCompare(Utilities.CurrentCulture, str1, offset1, length, str2, offset2, length, CompareOptions.None);
-        }
-
-        public static int OSCompare(string str1, int offset1, string str2, int offset2, int length, bool ignoreCase)
-        {
-            return OSCompare(Utilities.CurrentCulture, str1, offset1, length, str2, offset2, length, (ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None));
-        }
-
-        public static int OSCompare(string str1, int offset1, string str2, int offset2, int length, bool ignoreCase, CultureInfo ci)
-        {
-            return OSCompare(ci, str1, offset1, length, str2, offset2, length, (ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None));
-        }
-
-        public static int OSCompare(string str1, int offset1, string str2, int offset2, int length, StringComparison sc)
-        {
-            return OSCompare(str1, offset1, length, str2, offset2, length, sc);
-        }
-
-        public static int OSCompare(string str1, int offset1, int length1, string str2, int offset2, int length2, StringComparison sc)
-        {
-            switch (sc)
-            {
-                case StringComparison.CurrentCulture:
-                    return OSCompare(Utilities.CurrentCulture, str1, offset1, length1, str2, offset2, length2, CompareOptions.None);
-                case StringComparison.CurrentCultureIgnoreCase:
-                    return OSCompare(Utilities.CurrentCulture, str1, offset1, length1, str2, offset2, length2, CompareOptions.IgnoreCase);
-#if REMOVE
-                case StringComparison.InvariantCulture:
-                    return OSCompare(CultureInfo.InvariantCulture, str1, offset1, length1, str2, offset2, length2, CompareOptions.None);
-                case StringComparison.InvariantCultureIgnoreCase:
-                    return OSCompare(CultureInfo.InvariantCulture, str1, offset1, length1, str2, offset2, length2, CompareOptions.IgnoreCase);
-#endif
-                case StringComparison.Ordinal:
-                    return OSCompare(CultureInfo.InvariantCulture, str1, offset1, length1, str2, offset2, length2, CompareOptions.Ordinal);
-                case StringComparison.OrdinalIgnoreCase:
-                    return OSCompare(CultureInfo.InvariantCulture, str1, offset1, length1, str2, offset2, length2, CompareOptions.OrdinalIgnoreCase);
-                default:
-                    throw new NotSupportedException("Invalid StringComparison value");
-            }
-        }
-
-        [SecuritySafeCritical]
-        public static int OSCompare(CultureInfo ci, string str1, int offset1, int length1, string str2, int offset2, int length2, CompareOptions options)
-        {
-            // The OS blows up on nulls. So should we. These are handled in managed code and should be tested as ordinal, even if the ordinal
-            // compare option has not been selected.
-            if (str1 == null || str2 == null)
-                throw new NotSupportedException("Null strings should not be tested by the OS; these are managed code platform-agnostic cases.");
-
-            string str1offset = str1.Substring(offset1);
-            string str2offset = str2.Substring(offset2);
-
-            if (length1 > str1offset.Length) length1 = str1offset.Length;
-            if (length2 > str2offset.Length) length2 = str2offset.Length;
-
-            int ret;
-            if ((options & CompareOptions.Ordinal) != 0) // these flags cannot be used with other flags
-            {
-                if (Utilities.IsVistaOrLater)
-                    ret = CompareStringOrdinal(str1offset, length1, str2offset, length2, false);    // Supported VistaOrLater
-                else
-                    ret = GlobLocHelperCompareOrdinalForXP(str1offset, length1, str2offset, length2);
-            }
-            else if ((options & CompareOptions.OrdinalIgnoreCase) != 0) // these flags cannot be used with other flags
-            {
-                if (Utilities.IsVistaOrLater)
-                    ret = CompareStringOrdinal(str1offset, length1, str2offset, length2, true);    // Supported VistaOrLater
-                else
-                    throw new NotSupportedException("GlobLocHelper doesn't handle OrdinalIgnoreCase for earlier OSs than Vista");
-            }
-            else
-            {
-                int nativeCompareFlags = 0;
-
-                if ((options & CompareOptions.IgnoreCase) != 0) { nativeCompareFlags |= NORM_IGNORECASE; }
-                if ((options & CompareOptions.IgnoreKanaType) != 0) { nativeCompareFlags |= NORM_IGNOREKANATYPE; }
-                if ((options & CompareOptions.IgnoreNonSpace) != 0) { nativeCompareFlags |= NORM_IGNORENONSPACE; }
-                if ((options & CompareOptions.IgnoreSymbols) != 0) { nativeCompareFlags |= NORM_IGNORESYMBOLS; }
-                if ((options & CompareOptions.IgnoreWidth) != 0) { nativeCompareFlags |= NORM_IGNOREWIDTH; }
-                if ((options & CompareOptions.StringSort) != 0) { nativeCompareFlags |= SORT_STRINGSORT; }
-
-                if (Utilities.IsVistaOrLater)
-                {
-                    // NORM_LINGUISTIC_CASING: Windows Vista and later. Uses linguistic rules for casing, rather than file system rules (the default)
-                    if (CultureInfo.InvariantCulture == ci) nativeCompareFlags |= NORM_LINGUISTIC_CASING;
-                    ret = CompareStringEx(ci.ToString(), nativeCompareFlags, str1offset, length1, str2offset, length2, (IntPtr)null, (IntPtr)null, IntPtr.Zero);
-                }
-                else
-                    ret = CompareStringW(LCIDFromCultureInfo(ci), nativeCompareFlags, str1offset, length1, str2offset, length2);
-            }
-
-            switch (ret)
-            {
-                case 0: return -5;
-                case 1: return -1;
-                case 2: return 0;
-                case 3: return 1;
-                default: return -6;
-            }
-        }
-
-        /// <summary>
-        /// compare strA and strB char by char
-        /// if one of the given length is less than strings, it catches the exception and return 0 as error
-        /// </summary>
-        /// <param name="strA"></param>
-        /// <param name="strB"></param>
-        /// <param name="ignoreCase"></param>
-        /// <returns>retValue is compatible with CompareStringW</returns>
-        private static int GlobLocHelperCompareOrdinalForXP(string strA, int lengthA, string strB, int lengthB)
-        {
-            try
-            {
-                int retValue = 0;
-                int length = Math.Min(lengthA, lengthB);
-                for (int charA, charB, index = 0; index < length; index++)
-                {
-                    charA = strA[index];
-                    charB = strB[index];
-                    if (charA == charB)
-                        continue;
-
-                    retValue = (charA - charB);
-                    break;
-                }
-                if (retValue == 0)
-                    retValue = (lengthA - lengthB);
-
-                if (retValue == 0) return 2;
-                else if (retValue > 0) return 3;
-                else return 1;
-            }
-            catch (Exception e)
-            {
-                TestLibrary.TestFramework.LogError("GlobLocHelperCompareOrdinalForXP", "Unexpected Exception: " + e);
-            }
-            return 0;
-        }
-        #endregion
-
-        #region Character Info Helpers
-        public static bool CharIsHighSurrogate(char c)
-        {
-            return (c >= '\ud800' && c <= '\udbff');
-        }
-
-        public static bool CharIsLowSurrogate(char c)
-        {
-            return (c >= '\udc00' && c <= '\udfff');
-        }
-
-        public static bool CharIsSurrogate(char c)
-        {
-            return (CharIsHighSurrogate(c) || CharIsLowSurrogate(c));
-        }
-
-        public static int CharConvertToUtf32(char highChar, char lowChar)
-        {
-            return (((highChar - '\ud800') * 0x400) + (lowChar - '\udc00') + 0x1000);
-        }
-        #endregion
-
-        #region Encoding Helpers
-
-        public static Encoding GetEncoding(string id)
-        {
-            return Encoding.GetEncoding(id);
-        }
-
-        #endregion
-
-        #region DateTimeFormat Retrieval Helpers
-        private static List<string> Dates;
-        private static List<string> Times;
-
-        private static void ResetDatesAndTimes() { Dates = new List<string>(); Times = new List<string>(); }
-
-        //' [AllowReversePInvokeCalls]
-        private static bool GetDateFormats(string str)
-        {
-            Dates.Add(str);
-            return true;
-        }
-
-        //' [AllowReversePInvokeCalls]
-        private static bool GetTimeFormats(string str)
-        {
-            Times.Add(str);
-            return true;
-        }
-
-        private static string[] ComposeDatesAndTimes()
-        {
-            string[] ret = new string[Dates.Count * Times.Count];
-
-            for (int i = 0; i < Dates.Count; i++)
-            {
-                for (int j = 0; j < Times.Count; j++)
-                {
-                    ret[i * Times.Count + j] = Dates[i] + " " + Times[j];
-                }
-            }
-            return ret;
-        }
-
-        private static string GetMacDateTimeString(DateTime dt, string cultureStr, CFDateFormatterStyle dateStyle, CFDateFormatterStyle timeStyle)
-        {
-            return GetMacDateTimeStringHelper(dt, cultureStr, dateStyle, timeStyle, false);
-        }
-
-        private static string GetUnivMacDateTimeString(DateTime dt, string cultureStr, CFDateFormatterStyle dateStyle, CFDateFormatterStyle timeStyle)
-        {
-            return GetMacDateTimeStringHelper(dt, cultureStr, dateStyle, timeStyle, true);
-        }
-
-        [SecuritySafeCritical]
-        private static string GetMacDateTimeStringHelper(DateTime dt, string cultureStr, CFDateFormatterStyle dateStyle, CFDateFormatterStyle timeStyle, bool isUniv)
-        {
-#if REMOVE
-            IntPtr cfLocale = IntPtr.Zero;
-            IntPtr cfLocaleName = IntPtr.Zero;
-
-            cfLocaleName = CFStringCreateWithCharacters(IntPtr.Zero, cultureStr, cultureStr.Length);
-            cfLocale = CFLocaleCreate(IntPtr.Zero, cfLocaleName);
-
-            IntPtr cfDateFormatter = CFDateFormatterCreate(IntPtr.Zero, cfLocale, dateStyle, timeStyle);
-            if (isUniv)
-            {
-                IntPtr cfTZName = CFStringCreateWithCharacters(IntPtr.Zero, "GMT", 3);
-                IntPtr cfTZ = CFTimeZoneCreateWithName(IntPtr.Zero, cfTZName, true);
-                CFDateFormatterSetProperty(cfDateFormatter, GetCFString("kCFDateFormatterTimeZone"), cfTZ);
-                if (cfTZName != IntPtr.Zero)
-                    CFRelease(cfTZName);
-                if (cfTZ != IntPtr.Zero)
-                    CFRelease(cfTZ);
-            }
-            DateTime date = dt.ToUniversalTime();
-            IntPtr cfReturn = CFDateFormatterCreateStringWithAbsoluteTime(IntPtr.Zero, cfDateFormatter, ((double)date.Ticks) / WIN32_CF_TICKS_RATIO - WIN32_CF_TICKS_DELTA);
-            int newLength = CFStringGetLength(cfReturn);
-            CFRange cfRange = new CFRange();
-            cfRange.x = 0;
-            cfRange.y = newLength;
-            StringBuilder sb = new StringBuilder(newLength);
-            CFStringGetCharacters(cfReturn, cfRange, sb);
-            string ret = sb.ToString().Substring(0, newLength);
-
-            if (cfLocale != IntPtr.Zero)
-                CFRelease(cfLocale);
-            if (cfLocaleName != IntPtr.Zero)
-                CFRelease(cfLocaleName);
-            if (cfDateFormatter != IntPtr.Zero)
-                CFRelease(cfDateFormatter);
-            if (cfReturn != IntPtr.Zero)
-                CFRelease(cfReturn);
-            return ret;
-#else
-            throw new NotImplementedException();
-#endif
-        }
-        #endregion
-
-        #region Helper Methods
-        private static int LCIDFromCultureInfo(CultureInfo ci)
-        {
-            if (ci == null) ci = Utilities.CurrentCulture;
-            else //W2K do not support InvariantCulture, however, using "en-us" culture we will get the same results.
-                if (TestLibrary.Utilities.IsWin2K && ci == CultureInfo.InvariantCulture) ci = new CultureInfo("en-US");
-            return (LCIDFromCultureName(ci.ToString()));
-        }
-
-        public static int LCIDFromCultureName(string ci)
-        {
-            switch (ci.ToLower())
-            //' switch (ci.ToLower(CultureInfo.InvariantCulture))
-            {
-                case "ar": return 1;
-                case "bg": return 2;
-                case "ca": return 3;
-                case "zh-chs": return 4;
-                case "cs": return 5;
-                case "da": return 6;
-                case "de": return 7;
-                case "el": return 8;
-                case "en": return 9;
-                case "es": return 10;
-                case "fi": return 11;
-                case "fr": return 12;
-                case "he": return 13;
-                case "hu": return 14;
-                case "is": return 15;
-                case "it": return 16;
-                case "ja": return 17;
-                case "ko": return 18;
-                case "nl": return 19;
-                case "no": return 20;
-                case "pl": return 21;
-                case "pt": return 22;
-                case "ro": return 24;
-                case "ru": return 25;
-                case "hr": return 26;
-                case "sk": return 27;
-                case "sq": return 28;
-                case "sv": return 29;
-                case "th": return 30;
-                case "tr": return 31;
-                case "ur": return 32;
-                case "id": return 33;
-                case "uk": return 34;
-                case "be": return 35;
-                case "sl": return 36;
-                case "et": return 37;
-                case "lv": return 38;
-                case "lt": return 39;
-                case "fa": return 41;
-                case "vi": return 42;
-                case "hy": return 43;
-                case "az": return 44;
-                case "eu": return 45;
-                case "mk": return 47;
-                case "af": return 54;
-                case "ka": return 55;
-                case "fo": return 56;
-                case "hi": return 57;
-                case "ms": return 62;
-                case "kk": return 63;
-                case "ky": return 64;
-                case "sw": return 65;
-                case "uz": return 67;
-                case "tt": return 68;
-                case "pa": return 70;
-                case "gu": return 71;
-                case "ta": return 73;
-                case "te": return 74;
-                case "kn": return 75;
-                case "mr": return 78;
-                case "sa": return 79;
-                case "mn": return 80;
-                case "gl": return 86;
-                case "kok": return 87;
-                case "syr": return 90;
-                case "div": return 101;
-                case "": return 127;
-                case "inv": return 127;
-                case "ar-sa": return 0x00401;
-                case "bg-bg": return 0x00402;
-                case "ca-es": return 0x00403;
-                case "zh-tw": return 0x00404;
-                case "cs-cz": return 0x00405;
-                case "da-dk": return 0x00406;
-                case "de-de": return 0x00407;
-                case "el-gr": return 0x00408;
-                case "en-us": return 0x00409;
-                case "es-es_tradnl": return 0x0040a;
-                case "fi-fi": return 0x0040b;
-                case "fr-fr": return 0x0040c;
-                case "he-icase": return 0x0040d;
-                case "hu-hu": return 0x0040e;
-                case "is-is": return 0x0040f;
-                case "it-it": return 0x00410;
-                case "ja-jp": return 0x00411;
-                case "ko-kr": return 0x00412;
-                case "nl-ncase": return 0x00413;
-                case "nb-no": return 0x00414;
-                case "pl-pcase": return 0x00415;
-                case "pt-br": return 0x00416;
-                case "rm-ch": return 0x00417;
-                case "ro-ro": return 0x00418;
-                case "ru-ru": return 0x00419;
-                case "hr-hr": return 0x0041a;
-                case "sk-sk": return 0x0041b;
-                case "sq-acase": return 0x0041c;
-                case "sv-se": return 0x0041d;
-                case "th-th": return 0x0041e;
-                case "tr-tr": return 0x0041f;
-                case "ur-pk": return 0x00420;
-                case "id-id": return 0x00421;
-                case "uk-ua": return 0x00422;
-                case "be-by": return 0x00423;
-                case "sl-si": return 0x00424;
-                case "et-ee": return 0x00425;
-                case "lv-lv": return 0x00426;
-                case "lt-lt": return 0x00427;
-                case "tg-cyrl-tj": return 0x00428;
-                case "fa-ir": return 0x00429;
-                case "vi-vn": return 0x0042a;
-                case "hy-am": return 0x0042b;
-                case "az-latn-az": return 0x0042c;
-                case "eu-es": return 0x0042d;
-                case "hsb-de": return 0x0042e;
-                case "mk-mk": return 0x0042f;
-                case "tn-za": return 0x00432;
-                case "xh-za": return 0x00434;
-                case "zu-za": return 0x00435;
-                case "af-za": return 0x00436;
-                case "ka-ge": return 0x00437;
-                case "fo-fo": return 0x00438;
-                case "hi-in": return 0x00439;
-                case "mt-mt": return 0x0043a;
-                case "se-no": return 0x0043b;
-                case "ms-my": return 0x0043e;
-                case "kk-kz": return 0x0043f;
-                case "ky-kg": return 0x00440;
-                case "sw-ke": return 0x00441;
-                case "tk-tm": return 0x00442;
-                case "uz-latn-uz": return 0x00443;
-                case "tt-ru": return 0x00444;
-                case "bn-in": return 0x00445;
-                case "pa-in": return 0x00446;
-                case "gu-in": return 0x00447;
-                case "or-in": return 0x00448;
-                case "ta-in": return 0x00449;
-                case "te-in": return 0x0044a;
-                case "kn-in": return 0x0044b;
-                case "ml-in": return 0x0044c;
-                case "as-in": return 0x0044d;
-                case "mr-in": return 0x0044e;
-                case "sa-in": return 0x0044f;
-                case "mn-mn": return 0x00450;
-                case "bo-cn": return 0x00451;
-                case "cy-gb": return 0x00452;
-                case "km-kh": return 0x00453;
-                case "lo-la": return 0x00454;
-                case "gl-es": return 0x00456;
-                case "kok-in": return 0x00457;
-                case "syr-sy": return 0x0045a;
-                case "si-lk": return 0x0045b;
-                case "iu-cans-ca": return 0x0045d;
-                case "am-et": return 0x0045e;
-                case "ne-np": return 0x00461;
-                case "fy-ncase": return 0x00462;
-                case "ps-af": return 0x00463;
-                case "fil-ph": return 0x00464;
-                case "dv-mv": return 0x00465;
-                case "ha-latn-ng": return 0x00468;
-                case "yo-ng": return 0x0046a;
-                case "quz-bo": return 0x0046b;
-                case "nso-za": return 0x0046c;
-                case "ba-ru": return 0x0046d;
-                case "lb-lu": return 0x0046e;
-                case "kl-gcase": return 0x0046f;
-                case "ig-ng": return 0x00470;
-                case "ii-cn": return 0x00478;
-                case "arn-ccase": return 0x0047a;
-                case "moh-ca": return 0x0047c;
-                case "br-fr": return 0x0047e;
-                case "ug-cn": return 0x00480;
-                case "mi-nz": return 0x00481;
-                case "oc-fr": return 0x00482;
-                case "co-fr": return 0x00483;
-                case "gsw-fr": return 0x00484;
-                case "sah-ru": return 0x00485;
-                case "qut-gt": return 0x00486;
-                case "rw-rw": return 0x00487;
-                case "wo-sn": return 0x00488;
-                case "prs-af": return 0x0048c;
-                case "ar-iq": return 0x00801;
-                case "zh-cn": return 0x00804;
-                case "de-ch": return 0x00807;
-                case "en-gb": return 0x00809;
-                case "es-mx": return 0x0080a;
-                case "fr-be": return 0x0080c;
-                case "it-ch": return 0x00810;
-                case "nl-be": return 0x00813;
-                case "nn-no": return 0x00814;
-                case "pt-pt": return 0x00816;
-                case "sr-latn-cs": return 0x0081a;
-                case "sv-fi": return 0x0081d;
-                case "az-cyrl-az": return 0x0082c;
-                case "dsb-de": return 0x0082e;
-                case "se-se": return 0x0083b;
-                case "ga-ie": return 0x0083c;
-                case "ms-bn": return 0x0083e;
-                case "uz-cyrl-uz": return 0x00843;
-                case "bn-bd": return 0x00845;
-                case "mn-mong-cn": return 0x00850;
-                case "iu-latn-ca": return 0x0085d;
-                case "tzm-latn-dz": return 0x0085f;
-                case "quz-ec": return 0x0086b;
-                case "ar-eg": return 0x00c01;
-                case "zh-hk": return 0x00c04;
-                case "de-at": return 0x00c07;
-                case "en-au": return 0x00c09;
-                case "es-es": return 0x00c0a;
-                case "fr-ca": return 0x00c0c;
-                case "sr-cyrl-cs": return 0x00c1a;
-                case "se-fi": return 0x00c3b;
-                case "quz-pe": return 0x00c6b;
-                case "ar-ly": return 0x01001;
-                case "zh-sg": return 0x01004;
-                case "de-lu": return 0x01007;
-                case "en-ca": return 0x01009;
-                case "es-gt": return 0x0100a;
-                case "fr-ch": return 0x0100c;
-                case "hr-ba": return 0x0101a;
-                case "smj-no": return 0x0103b;
-                case "ar-dz": return 0x01401;
-                case "zh-mo": return 0x01404;
-                case "de-li": return 0x01407;
-                case "en-nz": return 0x01409;
-                case "es-cr": return 0x0140a;
-                case "fr-lu": return 0x0140c;
-                case "bs-latn-ba": return 0x0141a;
-                case "smj-se": return 0x0143b;
-                case "ar-ma": return 0x01801;
-                case "en-ie": return 0x01809;
-                case "es-pa": return 0x0180a;
-                case "fr-mc": return 0x0180c;
-                case "sr-latn-ba": return 0x0181a;
-                case "sma-no": return 0x0183b;
-                case "ar-tn": return 0x01c01;
-                case "en-za": return 0x01c09;
-                case "es-do": return 0x01c0a;
-                case "sr-cyrl-ba": return 0x01c1a;
-                case "sma-se": return 0x01c3b;
-                case "ar-om": return 0x02001;
-                case "en-jm": return 0x02009;
-                case "es-ve": return 0x0200a;
-                case "bs-cyrl-ba": return 0x0201a;
-                case "sms-fi": return 0x0203b;
-                case "ar-ye": return 0x02401;
-                case "en-029": return 0x02409;
-                case "es-co": return 0x0240a;
-                case "smn-fi": return 0x0243b;
-                case "ar-sy": return 0x02801;
-                case "en-bz": return 0x02809;
-                case "es-pe": return 0x0280a;
-                case "ar-jo": return 0x02c01;
-                case "en-tt": return 0x02c09;
-                case "es-ar": return 0x02c0a;
-                case "ar-lb": return 0x03001;
-                case "en-zw": return 0x03009;
-                case "es-ec": return 0x0300a;
-                case "ar-kw": return 0x03401;
-                case "en-ph": return 0x03409;
-                case "es-ccase": return 0x0340a;
-                case "ar-ae": return 0x03801;
-                case "es-uy": return 0x0380a;
-                case "ar-bh": return 0x03c01;
-                case "es-py": return 0x03c0a;
-                case "ar-qa": return 0x04001;
-                case "en-in": return 0x04009;
-                case "es-bo": return 0x0400a;
-                case "en-my": return 0x04409;
-                case "es-sv": return 0x0440a;
-                case "en-sg": return 0x04809;
-                case "es-hn": return 0x0480a;
-                case "es-ni": return 0x04c0a;
-                case "es-pr": return 0x0500a;
-                case "es-us": return 0x0540a;
-                case "x-iv_mathan": return 0x1007f;
-                case "de-de_phoneb": return 0x10407;
-                case "hu-hu_techncase": return 0x1040e;
-                case "ka-ge_modern": return 0x10437;
-                case "zh-cn_stroke": return 0x20804;
-                case "zh-sg_stroke": return 0x21004;
-                case "zh-mo_stroke": return 0x21404;
-                case "zh-tw_pronun": return 0x30404;
-                case "ja-jp_radstr": return 0x40411;
-
-                case "he-il": return 1037;
-                case "nl-nl": return 1043;
-                case "pl-pl": return 1045;
-                case "sq-al": return 1052;
-                case "az-az-latn": return 1068;
-                case "uz-uz-latn": return 1091;
-                case "div-mv": return 1125;
-                case "sr-sp-latn": return 2074;
-                case "az-az-cyrl": return 2092;
-                case "uz-uz-cyrl": return 2115;
-                case "sr-sp-cyrl": return 3098;
-                case "en-cb": return 9225;
-                case "es-cl": return 13322;
-                case "zh-cht": return 31748;
-                case "sr": return 31770;
-
-                default: return 127; // throw new NotSupportedException("No LCID available for that culture");
-            }
-        }
-
-        [SecuritySafeCritical]
-        private static string GetLocalizationInfo(int LCID, LCType type)
-        {
-            StringBuilder sb = new StringBuilder();
-            int count = GetLocaleInfo((uint)LCID, (uint)type, sb, 0);
-            sb = new StringBuilder(count);
-            GetLocaleInfo((uint)LCID, (uint)type, sb, count);
-            return sb.ToString();
-        }
-        #endregion
-    }
-#endif // if !FEATURE_NOPINVOKES
-}
index 9a5a769..72826f3 100644 (file)
@@ -56,22 +56,6 @@ namespace TestLibrary
             }
         }
 
-        public static bool IsBigEndian
-        {
-            get
-            {
-                return EndianessChecker.IsBigEndian();
-            }
-        }
-
-        public static bool IsLittleEndian
-        {
-            get
-            {
-                return EndianessChecker.IsLittleEndian();
-            }
-        }
-
         public static bool IsWindows
         {
             [SecuritySafeCritical]
@@ -81,53 +65,6 @@ namespace TestLibrary
             }
         }
 
-        public static bool IsVista
-        {
-            get
-            {
-                return false;
-            }
-        }
-
-        public static bool IsVistaOrLater
-        {
-            get
-            {
-                return true;
-            }
-        }
-
-        public static bool IsWin2K
-        {
-            get
-            {
-                return false;
-            }
-        }
-
-        public static bool IsWin7
-        {
-            get
-            {
-                return false;
-            }
-        }
-
-        public static bool IsWin7OrLater
-        {
-            get
-            {
-                return true; //Win8P is always win8+
-            }
-        }
-
-        public static bool PlatformSpecificComparer(object Actual, object XPExpected, object VistaExpected, object MACPPCExpected, object MACX86Expected)
-        {
-            if (!IsWindows) return (Actual.Equals(IsBigEndian ? MACPPCExpected : MACX86Expected));
-            if (IsVista) return (Actual.Equals(VistaExpected));
-            return Actual.Equals(XPExpected);
-        }
-
         // return whether or not the OS is a 64 bit OS
         public static bool Is64
         {
@@ -152,48 +89,6 @@ namespace TestLibrary
             return sb.ToString();
         }
 
-        public static byte[] TrimBytes(byte[] input)
-        {
-            int outputLength = input.Length;
-            int pos = 0;
-            while (pos < input.Length && input[pos] == 0) { outputLength--; pos++; }
-            int newStart = pos;
-            pos = input.Length - 1;
-            while (input[pos] == 0) { outputLength--; pos--; }
-
-            byte[] output = new byte[outputLength];
-            for (int i = 0; i < outputLength; i++)
-            {
-                output[i] = input[i + newStart];
-            }
-
-            return output;
-        }
-
-        public static bool CompareBytes(byte[] arr1, byte[] arr2)
-        {
-            if (arr1 == null) return (arr2 == null);
-            if (arr2 == null) return false;
-
-            if (arr1.Length != arr2.Length) return false;
-
-            for (int i = 0; i < arr1.Length; i++) if (arr1[i] != arr2[i]) return false;
-
-            return true;
-        }
-
-        public static bool CompareChars(char[] arr1, char[] arr2)
-        {
-            if (arr1 == null) return (arr2 == null);
-            if (arr2 == null) return false;
-
-            if (arr1.Length != arr2.Length) return false;
-
-            for (int i = 0; i < arr1.Length; i++) if (arr1[i] != arr2[i]) return false;
-
-            return true;
-        }
-
         // Given a string, display the unicode characters in hex format, optionally displaying each 
         // characters unicode category
         public static string FormatHexStringFromUnicodeString(string string1, bool includeUnicodeCategory)
@@ -230,19 +125,6 @@ namespace TestLibrary
             return ((int)char1).ToString("X4");
         }
 
-        public static bool IsHighSurrogate(char c)
-        {
-            return ((c >= HIGH_SURROGATE_START) && (c <= HIGH_SURROGATE_END));
-        }
-        public static bool IsLowSurrogate(char c)
-        {
-            return ((c >= LOW_SURROGATE_START) && (c <= LOW_SURROGATE_END));
-        }
-
-        public static bool CompareCurrentCulture(String culture)
-        {
-            return (String.Compare(System.Globalization.CultureInfo.CurrentCulture.Name, culture, StringComparison.CurrentCultureIgnoreCase) == 0);
-        }
         public static CultureInfo CurrentCulture
         {
             get { return System.Globalization.CultureInfo.CurrentCulture; }
@@ -253,35 +135,3 @@ namespace TestLibrary
         }
     }
 }
-
-public static class HelperExtensions {
-   public static bool IsAssignableFrom(this Type t1, Type t2) {
-      return t1.GetTypeInfo().IsAssignableFrom(t2.GetTypeInfo());
-   }
-
-   public static String ToLongDateString(this DateTime dt)
-   {
-       return String.Format("{0:D}", dt);
-   }
-
-   public static String ToLongTimeString(this DateTime dt)
-   {
-       return String.Format("{0:T}", dt);
-   }
-
-
-   public static String ToShortDateString(this DateTime dt)
-   {
-       return String.Format("{0:d}", dt);
-   }
-
-   public static String ToShortTimeString(this DateTime dt)
-   {
-       return String.Format("{0:t}", dt);
-   }
-
-   public static UnicodeCategory GetUnicodeCategory(this Char c)
-   {
-       return CharUnicodeInfo.GetUnicodeCategory(c);
-   }
-}
diff --git a/tests/src/CoreMangLib/cti/system/string/StringCompare1.csproj b/tests/src/CoreMangLib/cti/system/string/StringCompare1.csproj
deleted file mode 100644 (file)
index 6a4c58a..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
-    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <CLRTestKind>BuildAndRun</CLRTestKind>
-    <CLRTestPriority>1</CLRTestPriority>
-  </PropertyGroup>
-  <!-- Default configurations to help VS understand the configurations -->
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-  </PropertyGroup>
-  <ItemGroup>
-    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
-      <Visible>False</Visible>
-    </CodeAnalysisDependentAssemblyPaths>
-  </ItemGroup>
-  <ItemGroup>
-    <!-- Add Compile Object Here -->
-    <Compile Include="stringcompare1.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
-    <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
-  </ItemGroup>
-  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
-  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
-  </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringCompare15.csproj b/tests/src/CoreMangLib/cti/system/string/StringCompare15.csproj
deleted file mode 100644 (file)
index 78bacd8..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
-    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <CLRTestKind>BuildAndRun</CLRTestKind>
-    <CLRTestPriority>1</CLRTestPriority>
-  </PropertyGroup>
-  <!-- Default configurations to help VS understand the configurations -->
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-  </PropertyGroup>
-  <ItemGroup>
-    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
-      <Visible>False</Visible>
-    </CodeAnalysisDependentAssemblyPaths>
-  </ItemGroup>
-  <ItemGroup>
-    <!-- Add Compile Object Here -->
-    <Compile Include="stringcompare15.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
-    <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
-  </ItemGroup>
-  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
-  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
-  </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringCompare2.csproj b/tests/src/CoreMangLib/cti/system/string/StringCompare2.csproj
deleted file mode 100644 (file)
index 0f00954..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
-    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <CLRTestKind>BuildAndRun</CLRTestKind>
-    <CLRTestPriority>1</CLRTestPriority>
-  </PropertyGroup>
-  <!-- Default configurations to help VS understand the configurations -->
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-  </PropertyGroup>
-  <ItemGroup>
-    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
-      <Visible>False</Visible>
-    </CodeAnalysisDependentAssemblyPaths>
-  </ItemGroup>
-  <ItemGroup>
-    <!-- Add Compile Object Here -->
-    <Compile Include="stringcompare2.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
-    <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
-  </ItemGroup>
-  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
-  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
-  </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/stringcompare1.cs b/tests/src/CoreMangLib/cti/system/string/stringcompare1.cs
deleted file mode 100644 (file)
index d0f9e1f..0000000
+++ /dev/null
@@ -1,724 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-using System;
-using System.Collections;
-using TestLibrary;
-
-class StringCompare1
-{
-    const string str1 = "HELLOWORLD";
-    const string str2 = "helloworld";
-
-    /// <summary>
-    /// Test String.Compare(System.String,System.Int32,System.String,System.Int32,System.Int32)
-    /// </summary>
-    /// <param name="args"></param>
-    /// <returns></returns>
-    public static int Main(string[] args)
-    {
-        StringCompare1 sc = new StringCompare1();
-        TestLibrary.TestFramework.BeginScenario("Test String.Compare(System.String,System.Int32,System.String,System.Int32,System.Int32)");
-
-        if (sc.RunTests())
-        {
-            TestLibrary.TestFramework.EndTestCase();
-            TestLibrary.TestFramework.LogInformation("PASS");
-            return 100;
-        }
-        else
-        {
-            TestLibrary.TestFramework.EndTestCase();
-            TestLibrary.TestFramework.LogInformation("FAIL");
-            return 0;
-        }
-    }
-
-    public bool RunTests()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.LogInformation("[Positive]");
-        retVal = PosTest1() && retVal;
-        retVal = PosTest2() && retVal;
-        retVal = PosTest3() && retVal;
-        retVal = PosTest4() && retVal;       
-
-        TestLibrary.TestFramework.LogInformation("");
-
-        TestLibrary.TestFramework.LogInformation("[Negative]");
-        retVal = NegTest1() && retVal;
-        retVal = NegTest2() && retVal;
-        retVal = NegTest3() && retVal;
-        retVal = NegTest4() && retVal;
-        retVal = NegTest5() && retVal;
-        retVal = NegTest6() && retVal;
-        retVal = NegTest7() && retVal;
-        retVal = NegTest8() && retVal;
-        retVal = NegTest9() && retVal;
-        retVal = NegTest10() && retVal;
-        retVal = NegTest11() && retVal;
-        retVal = NegTest12() && retVal;
-        retVal = NegTest13() && retVal;
-        retVal = NegTest14() && retVal;
-        retVal = NegTest15() && retVal;
-        retVal = NegTest16() && retVal;
-        retVal = NegTest17() && retVal;
-        retVal = NegTest18() && retVal;
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two same strings with different cases...
-    /// </summary>
-    /// <returns></returns>
-    public bool PosTest1()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two same strings with different cases...");
-
-        try
-        {
-            int expected = GlobLocHelper.OSCompare(str1, 0, str2, 0, str1.Length);  // 1;
-            if (String.Compare(str1, 0, str2, 0, str1.Length) != expected)
-            {
-                TestLibrary.TestFramework.LogError("001", "The result is equal when compare different cases string!");
-                TestLibrary.TestFramework.LogInformation("Expected: " + expected.ToString() + " Actual: " + String.Compare(str1, 0, str2, 0, str1.Length).ToString());
-                retVal = false;
-            }
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("002", "Unexpected Exception occurs :" + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two null string with indexed and length are zero...
-    /// </summary>
-    /// <returns></returns>
-    public bool PosTest2()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two null string with indexed and length are zero...");
-
-        try
-        {
-            if (String.Compare(null, 0, null, 0, 0) != 0)
-            {
-                TestLibrary.TestFramework.LogError("003", "The result is not equal when compare two string with null value!");
-                retVal = false;
-            }
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("004", "Unexpected Exception occurs :" + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two strings which the first of them is null...
-    /// </summary>
-    /// <returns></returns>
-    public bool PosTest3()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two strings which the first of them is null...");
-
-        try
-        {
-            if (String.Compare(null, 0, str1, 0, 0) != -1)
-            {
-                TestLibrary.TestFramework.LogError("005", "String with null value should be smaller than string with content!");
-                retVal = false;
-            }
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("006", "Unexpected Exception occurs :" + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two strings which the second of them is null...
-    /// </summary>
-    /// <returns></returns>
-    public bool PosTest4()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two strings which the second of them is null...");
-
-        try
-        {
-            if (String.Compare(str1, 0, null, 0, 0) != 1)
-            {
-                TestLibrary.TestFramework.LogError("007", "String with content should be larger than string with null value!");
-                retVal = false;
-            }
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("008", "Unexpected Exception occurs :" + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two strings with the first index out of range...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest1()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two strings with the first index out of range...");
-
-        try
-        {
-            String.Compare(str1, str1.Length + 1, str2, 0, 0);
-
-            TestLibrary.TestFramework.LogError("009", "No exception is thrown!");
-            retVal = false;
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when the first index is out of range!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("010","Unexpected Exception occurs :" + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Copmare two strings with the second index out of range...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest2() 
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Copmare two strings with the second index out of range...");
-
-        try
-        {
-            String.Compare(str1,0,str2,str2.Length+1,0);
-
-            TestLibrary.TestFramework.LogError("011", "No exception is thrown!");
-            retVal = false;
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when the first index is out of range!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("012", "Unexpected Exception occurs :" + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare the strings with the first index is negtive...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest3()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare the strings with the first index is negtive...");
-        try
-        {
-            String.Compare(str1, -1, str2, 0, str2.Length);
-
-            TestLibrary.TestFramework.LogError("013", "No exception occurs!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when a given indexes are negative!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare the strings with the second index is negtive...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest4()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare the strings with the second index is negtive...");
-        try
-        {
-            String.Compare(str1, -1, str2, 0, str2.Length);
-
-            TestLibrary.TestFramework.LogError("015", "No exception occurs!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when a given indexes are negative!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare the strings with length is negative...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest5()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare the strings with length is negative...");
-        try
-        {
-            String.Compare(str1, 0, str2, 0, -1);
-
-            TestLibrary.TestFramework.LogError("017", "No exception occurs!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when a given length is negative!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two strings with max+1 length... 
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest6()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two strings with max+1 length... ");
-        try
-        {
-            if (String.Compare(str1, 0, str1, 0, str1.Length + 1) != 0)
-            {
-                TestLibrary.TestFramework.LogError("019", "Can't compare strings ignoring length exceed max!");
-                retVal = false;
-            }
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when length is max+1");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("020","Unexpected exception occurs :" + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two null strings with length out of range...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest7()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two null strings with length out of range...");
-        try
-        {
-            String.Compare(null, 0, null, 0, 1);
-
-            TestLibrary.TestFramework.LogError("021", "Compare failed!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when a given length is out of range!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("022", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two null strings with first index out of range...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest8()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two null strings with first index out of range...");
-        try
-        {
-            String.Compare(null, 1, null, 0, 0);
-
-            TestLibrary.TestFramework.LogError("023", "Compare failed!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when a given index is out of range!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("024", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two null strings with first index out of range...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest9()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two null strings with first index out of range...");
-        try
-        {
-            String.Compare(null, 0, null, 1, 0);
-
-            TestLibrary.TestFramework.LogError("025", "Compare failed!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when a given index is out of range!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("026", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two null strings with two indexes out of range...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest10()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two null strings with two indexes out of range...");
-        try
-        {
-            String.Compare(null, 1, null, 1, 0);
-
-            TestLibrary.TestFramework.LogError("027", "Compare failed!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when given indexes is out of range!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("028", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two null strings with two indexes are negtive...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest11()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two null strings with two indexes are negtive...");
-        try
-        {
-            String.Compare(null, -1, null, -1, 0);
-
-            TestLibrary.TestFramework.LogError("029", "Compare failed!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when given indexes is out of range!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("030", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two null strings with the first index is negtive...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest12()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two null strings with the first index is negtive...");
-        try
-        {
-            String.Compare(null, -1, null, 0, 0);
-
-            TestLibrary.TestFramework.LogError("031", "Compare failed!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when given indexes is out of range!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("032", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two null strings with the second index is negtive...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest13()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two null strings with the second index is negtive...");
-        try
-        {
-            String.Compare(null, 0, null, -1, 0);
-
-            TestLibrary.TestFramework.LogError("033", "Compare failed!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when given indexes is out of range!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("034", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two strings which the first is null and the length is not zero...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest14()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two strings which the first string is null and the length is not zero...");
-        try
-        {
-            String.Compare(null, 0, str1, 0, 1);
-
-            TestLibrary.TestFramework.LogError("035", "Compare failed!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when the first is null and the length is not zero!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("036", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two strings which the second string is null and the length is not zero...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest15()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two strings which the second string is null and the length is not zero...");
-        try
-        {
-            String.Compare(str1, 0, null, 0, 1);
-
-            TestLibrary.TestFramework.LogError("037", "Compare failed!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when the second string is null and the length is not zero!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("038", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two null strings with max+1 length...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest16()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two null strings with max+1 length...");
-        try
-        {
-            String.Compare(null, 0, null, 0, -1);
-
-            TestLibrary.TestFramework.LogError("039", "Compare failed!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when a given length is out of range!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("040", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two strings which the first string is null and max+1 length...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest17()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two strings which the first string is null and the negtive length...");
-        try
-        {
-            String.Compare(null, 0, str1, 0, -1);
-
-            TestLibrary.TestFramework.LogError("041", "Compare failed!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when which the first string is null and the negtive length!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("042", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-    /// <summary>
-    /// Compare two strings which the second string is null and with max+1 length...
-    /// </summary>
-    /// <returns></returns>
-    public bool NegTest18()
-    {
-        bool retVal = true;
-
-        TestLibrary.TestFramework.BeginScenario("Compare two strings which the second string is null and with the negtive length...");
-        try
-        {
-            String.Compare(str1, 0, null, 0, 1);
-
-            TestLibrary.TestFramework.LogError("043", "Compare failed!");
-            retVal = false;
-
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown which the second string is null and with the negtive length!");
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError("044", "Unexpected exception: " + e);
-            retVal = false;
-        }
-
-        return retVal;
-    }
-
-
-}
-
diff --git a/tests/src/CoreMangLib/cti/system/string/stringcompare15.cs b/tests/src/CoreMangLib/cti/system/string/stringcompare15.cs
deleted file mode 100644 (file)
index fb847c5..0000000
+++ /dev/null
@@ -1,408 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-using System;
-using System.Globalization;
-using TestLibrary;
-
-/// <summary>
-/// String.Compare Method (String, String) 
-/// The comparison uses the current culture to obtain culture-specific information such as 
-/// casing rules and the alphabetic order of individual characters. 
-/// The comparison is performed using word sort rules. 
-/// </summary>
-class StringCompare5
-{
-    private const int c_MIN_STRING_LEN = 8;
-    private const int c_MAX_STRING_LEN = 256;
-
-    private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
-    private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
-    private const int c_MAX_LONG_STR_LEN = 65535;
-
-    private const string c_POS_TEST_PREFIX = "PosTest";
-    private const string c_NEG_TEST_PREFIX = "NegTest";
-
-    private int totalTestCount;
-    private int posTestCount ;
-    private int negTestCount;
-    private int passedTestCount;
-    private int failedTestCount;
-
-    private enum TestType { PositiveTest = 1, NegativeTest = 2 };
-    private enum TestResult {NotRun = 0, PassedTest = 1, FailedTest = 2};
-    internal struct Parameters
-    {
-        public string strA, strB;
-
-        public string DataString
-        {
-            get 
-            {
-                string str = string.Format("\n\tFirst string: {0}, Second string: {1}", strA, strB);
-                str += string.Format("\n\tFirst string length:{0}, second string length:{1}", strA.Length, strB.Length);
-                return str;
-            }
-        }
-    }
-
-    //Default constructor to ninitial all kind of test counts
-    public StringCompare5()
-    {
-        totalTestCount = posTestCount = negTestCount = 0;
-        passedTestCount = failedTestCount = 0;
-    }
-
-    //Update (postive or negative) and total test count at the beginning of test scenario
-    private void UpdateCounts(TestType testType)
-    {
-        if (TestType.PositiveTest == testType)
-        {
-            posTestCount++;
-            totalTestCount++;
-            return;
-        }
-
-        if (TestType.NegativeTest == testType)
-        {
-            negTestCount++;
-            totalTestCount++;
-            return;
-        }
-    }
-
-    //Generate standard error number string
-    //i.e "9", "12" is not proper. Instead they should be "009", "012"
-    private string GenerateErrorNum(int errorNum)
-    {
-        string temp = errorNum.ToString();
-        string errorNumStr = new string('0', 3 - temp.Length) + temp;
-        return errorNumStr;
-    }
-
-    //Update failed or passed test counts at the end of test scenario
-    private void UpdateCounts(TestResult testResult)
-    {
-        if (TestResult.PassedTest == testResult)
-        {
-            passedTestCount++;
-            return;
-        }
-
-        if (TestResult.FailedTest == testResult)
-        {
-            failedTestCount++;
-            return;
-        }
-    }
-
-  public static int Main()
-    {
-        StringCompare5 sc = new StringCompare5();
-
-        TestLibrary.TestFramework.BeginTestCase("for method: String.Compare Method (String, String)");
-        if (sc.RunTests())
-        {
-            TestLibrary.TestFramework.EndTestCase();
-            TestLibrary.TestFramework.LogInformation("PASS");
-            return 100;
-        }
-        else
-        {
-            TestLibrary.TestFramework.EndTestCase();
-            TestLibrary.TestFramework.LogInformation("FAIL");
-            return 0;
-        }
-    }
-
-    public bool RunTests()
-    {
-        bool retVal = true;
-
-        //Postive test scenarios
-        TestLibrary.TestFramework.LogInformation("[Positive]");
-        retVal = PosTest1() && retVal;
-        retVal = PosTest2() && retVal;
-        retVal = PosTest3() && retVal;
-        retVal = PosTest4() && retVal;
-        
-        //Negative test scenarios
-        TestLibrary.TestFramework.LogInformation("[Negative]");
-        //retVal = NegTest1() && retVal;
-
-        return retVal;
-    }
-
-    #region Positive test scenarioes
-
-    public bool PosTest1()
-    {
-        Parameters paras;
-
-        const string c_testDesc = "Two null comparison.";
-        const int c_expectedValue = 0;
-
-        paras.strA = null;
-        paras.strB = null;
-
-        return ExecutePosTestZero(paras, c_expectedValue, c_testDesc);
-    }
-
-    public bool PosTest2()
-    {
-        Parameters paras;
-
-        const string c_testDesc = "Null vs String.Empty";
-        const bool c_expectedValue = true;
-
-        paras.strA = null;
-        paras.strB = string.Empty;
-
-        return ExecutePosTestLesser(paras, c_expectedValue, c_testDesc);
-    }
-
-    public bool PosTest3()
-    {
-        Parameters paras;
-
-        const string c_testDesc = "Long string(>256 chars) vs long string (>256 chars)";
-        const bool c_expectedValue = true;
-
-        string strBasic1 = TestLibrary.Generator.GetString(-55, false, c_MIN_LONG_STR_LEN, c_MAX_LONG_STR_LEN - 16);
-        string strBasic2 = TestLibrary.Generator.GetString(-55, false, 8, 8);
-        char ch = TestLibrary.Generator.GetChar(-55);
-        paras.strA = strBasic1 + strBasic2;
-        paras.strB = strBasic1 + strBasic2 + strBasic2;
-
-        return ExecutePosTestLesser(paras, c_expectedValue, c_testDesc);
-    }
-
-    public bool PosTest4()
-    {
-        Parameters paras;
-
-        const string c_testDesc = "Short string (<32 chars) vs long string(>256 chars)";
-        const bool c_expectedValue = true;
-
-        string strBasic = TestLibrary.Generator.GetString(-55, false, 20920, 20920);
-        paras.strA = strBasic.Substring(0,this.GetInt32(1,c_MAX_SHORT_STR_LEN));
-        paras.strB = strBasic;
-
-        return ExecutePosTestLesser(paras, c_expectedValue, c_testDesc);
-    }
-
-    #endregion
-
-    #region Helper methods for positive test scenarioes
-
-    //Zero value returned from test method means that two substrings equal    
-    private bool ExecutePosTestZero(Parameters paras, int expectedValue, string testDesc)
-    {
-        bool retVal = true;
-        UpdateCounts(TestType.PositiveTest);
-
-        string testInfo = c_POS_TEST_PREFIX + this.posTestCount.ToString() +": " + testDesc;
-        int actualValue;
-
-        TestResult testResult = TestResult.NotRun;
-
-        TestLibrary.TestFramework.BeginScenario(testInfo);
-        try
-        {
-            actualValue = this.CallTestMethod(paras);
-            if (paras.strA != null && paras.strB != null) expectedValue = GlobLocHelper.OSCompare(paras.strA, paras.strB);
-            if (expectedValue != actualValue)
-            {
-                string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
-                TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount), errorDesc);
-                testResult = TestResult.FailedTest;
-                retVal = false;
-            }
-            testResult = TestResult.PassedTest;
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount + 1), "Unexpected exception: " + e);
-            testResult = TestResult.FailedTest;
-            retVal = false;
-        }
-
-        UpdateCounts(testResult);
-        return retVal;
-    }
-
-    // True value returned from test method means that two substrings do not equal
-    private bool ExecutePosTestNonzero(Parameters paras, bool expectedValue, string testDesc)
-    {
-        bool retVal = true;
-        UpdateCounts(TestType.PositiveTest);
-
-        string testInfo = c_POS_TEST_PREFIX + this.posTestCount.ToString() + ": " + testDesc;
-        bool actualValue;
-
-        TestResult testResult = TestResult.NotRun;
-
-        TestLibrary.TestFramework.BeginScenario(testInfo);
-        try
-        {
-            actualValue = (0 != this.CallTestMethod(paras));
-            if (paras.strA != null && paras.strB != null) expectedValue = (0 != GlobLocHelper.OSCompare(paras.strA, paras.strB));
-            if (expectedValue != actualValue)
-            {
-                string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
-                TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount), errorDesc);
-                testResult = TestResult.FailedTest;
-                retVal = false;
-            }
-            testResult = TestResult.PassedTest;
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount + 1), "Unexpected exception: " + e);
-            testResult = TestResult.FailedTest;
-            retVal = false;
-        }
-
-        UpdateCounts(testResult);
-        return retVal;
-    }
-
-    // True value returned from test method means that the first substring lesser than the second
-    private bool ExecutePosTestLesser(Parameters paras, bool expectedValue, string testDesc)
-    {
-        bool retVal = true;
-        UpdateCounts(TestType.PositiveTest);
-
-        string testInfo = c_POS_TEST_PREFIX + this.posTestCount.ToString() + ": " + testDesc;
-        bool actualValue;
-
-        TestResult testResult = TestResult.NotRun;
-
-        TestLibrary.TestFramework.BeginScenario(testInfo);
-        try
-        {
-            actualValue = (0 > this.CallTestMethod(paras));
-            if (paras.strA != null && paras.strB != null) expectedValue = (0 > GlobLocHelper.OSCompare(paras.strA, paras.strB));
-            if (expectedValue != actualValue)
-            {
-                string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
-                errorDesc += paras.DataString;
-                TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount), errorDesc);
-                testResult = TestResult.FailedTest;
-                retVal = false;
-            }
-            testResult = TestResult.PassedTest;
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount + 1), "Unexpected exception: " + e);
-            testResult = TestResult.FailedTest;
-            retVal = false;
-        }
-
-        UpdateCounts(testResult);
-        return retVal;
-    }
-
-    #endregion
-
-    #region Helper methods for negative test scenarioes
-    //Test ArgumentOutOfRangeException
-    private bool ExeNegTest_AOORE(Parameters paras, string testDesc, string errorDesc)
-    {
-        bool retVal = true;
-        UpdateCounts(TestType.NegativeTest);
-
-        string testInfo = c_NEG_TEST_PREFIX + this.negTestCount.ToString() + ": " + testDesc;
-
-        TestResult testResult = TestResult.NotRun;
-
-        TestLibrary.TestFramework.BeginScenario(testInfo);
-        try
-        {
-            this.CallTestMethod(paras);
-            TestLibrary.TestFramework.LogError(GenerateErrorNum((this.totalTestCount << 1) - 1), errorDesc);
-            testResult = TestResult.FailedTest;
-            retVal = false;
-        }
-        catch (ArgumentOutOfRangeException)
-        {
-            testResult = TestResult.PassedTest;
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount << 1), "Unexpected exception: " + e);
-            testResult = TestResult.FailedTest;
-            retVal = false;
-        }
-
-        UpdateCounts(testResult);
-        return retVal;
-    }
-
-    //Test ArgumentNullException
-    private bool ExeNegTest_ANE(Parameters paras, string testDesc, string errorDesc)
-    {
-        bool retVal = true;
-        UpdateCounts(TestType.NegativeTest);
-
-        string testInfo = c_NEG_TEST_PREFIX + this.negTestCount.ToString() + ": " + testDesc;
-
-        TestResult testResult = TestResult.NotRun;
-
-        TestLibrary.TestFramework.BeginScenario(testInfo);
-        try
-        {
-            this.CallTestMethod(paras);
-            TestLibrary.TestFramework.LogError(GenerateErrorNum((this.totalTestCount << 1) - 1), errorDesc);
-            testResult = TestResult.FailedTest;
-            retVal = false;
-        }
-        catch (ArgumentNullException)
-        {
-            testResult = TestResult.PassedTest;
-        }
-        catch (Exception e)
-        {
-            TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount <<1), "Unexpected exception: " + e);
-            testResult = TestResult.FailedTest;
-            retVal = false;
-        }
-
-        UpdateCounts(testResult);
-        return retVal;
-    }
-#endregion
-
-    //Involke the test method
-    //In this test case this method is System.String.Compare() with 7 parameters
-    private int CallTestMethod(Parameters paras)
-    {
-        return string.Compare(paras.strA, paras.strB);
-    }
-
-    #region helper methods for generating test data
-    private bool GetBoolean()
-    {
-        Int32 i = this.GetInt32(1,2);
-        return (i == 1) ? true : false;
-    }
-
-    //Get a non-negative integer between minValue and maxValue
-    private Int32 GetInt32(Int32 minValue, Int32 maxValue)
-    {
-        return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
-    }
-
-    private Int32 Min(Int32 i1, Int32 i2)
-    {
-        return (i1 <= i2) ? i1 : i2;
-    }
-
-    private Int32 Max(Int32 i1, Int32 i2)
-    {
-        return (i1 >= i2) ? i1 : i2;
-    }
-    #endregion
-}
-
diff --git a/tests/src/CoreMangLib/cti/system/string/stringcompare2.cs b/tests/src/CoreMangLib/cti/system/string/stringcompare2.cs
deleted file mode 100644 (file)
index e582fe9..0000000
+++ /dev/null
@@ -1,416 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-using System;
-using System.Collections;
-using TestLibrary;
-
-namespace DictionaryEntryCtor
-{
-    class DictionaryEntryCtor
-    {
-        const string str1 = "HELLOWORLD";
-        const string str2 = "helloworld";
-        public static int Main(string[] args)
-        {
-            DictionaryEntryCtor dec = new DictionaryEntryCtor();
-            TestLibrary.TestFramework.BeginTestCase("Compare(System.String,System.Int32,System.String,System.Int32,System.Int32,System.StringComparision)");
-
-            if (dec.RunTests())
-            {
-                TestLibrary.TestFramework.EndTestCase();
-                TestLibrary.TestFramework.LogInformation("PASS");
-                return 100;
-            }
-            else
-            {
-                TestLibrary.TestFramework.EndTestCase();
-                TestLibrary.TestFramework.LogInformation("FAIL");
-                return 0;
-            }
-        }
-
-        /// <summary>
-        /// Compare(System.String,System.Int32,System.String,System.Int32,System.Int32,System.Boolean)
-        /// </summary>
-        /// <returns></returns>
-        public bool RunTests()
-        {
-            bool retVal = true;
-
-            TestLibrary.TestFramework.LogInformation("[Positive]");
-            retVal = PosTest1() && retVal;
-            retVal = PosTest2() && retVal;
-            retVal = PosTest3() && retVal;
-            retVal = PosTest4() && retVal;
-
-            TestLibrary.TestFramework.LogInformation("");
-
-            TestLibrary.TestFramework.LogInformation("[Negative]");
-            retVal = NegTest1() && retVal;
-            retVal = NegTest2() && retVal;
-            retVal = NegTest3() && retVal;
-            retVal = NegTest4() && retVal;
-            retVal = NegTest5() && retVal;
-            retVal = NegTest6() && retVal;
-            retVal = NegTest7() && retVal;
-            retVal = NegTest8() && retVal;
-
-            return retVal;
-
-        }
-
-        /// <summary>
-        /// Compare the same string with different cases when ignore the case
-        /// </summary>
-        /// <returns></returns>
-        public bool PosTest1()
-        {
-            bool retVal = true;
-
-            try
-            {
-                TestLibrary.TestFramework.BeginScenario("Compare the same string with different cases when ignore the case...");
-                int expected = GlobLocHelper.OSCompare(str1, 2, str2, 2, 3, true); // 0;
-                if (String.Compare(str1, 2, str2, 2, 3, StringComparison.CurrentCultureIgnoreCase) != expected)
-                {
-                    TestLibrary.TestFramework.LogError("001", "LLOWO is not equal to llowo when ignore the case...");
-                    retVal = false;
-                }
-            }
-            catch (Exception e)
-            {
-                TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
-                retVal = false;
-            }
-
-
-            return retVal;
-        }
-
-        /// <summary>
-        /// Compare the same string with different cases when the case is considered
-        /// </summary>
-        /// <returns></returns>
-        public bool PosTest2()
-        {
-            bool retVal = true;
-
-            try
-            {
-                TestLibrary.TestFramework.BeginScenario("Compare the same string with different cases when the case is considered...");
-                int expected = GlobLocHelper.OSCompare(str1, 2, str2, 2, 3, false); // 1;
-                if (String.Compare(str1, 2, str2, 2, 3, StringComparison.CurrentCulture) != expected)
-                {
-                    TestLibrary.TestFramework.LogError("009", "LLOWO is not larger than llowo when the case is considered!");
-                    retVal = false;
-                }
-            }
-            catch (Exception e)
-            {
-                TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
-                retVal = false;
-            }
-
-
-            return retVal;
-        }
-
-        /// <summary>
-        /// Compare two null strings with indexs and length as zero
-        /// </summary>
-        /// <returns></returns>
-        public bool PosTest3()
-        {
-            bool retVal = true;
-
-            TestLibrary.TestFramework.BeginScenario("Compare two null strings with indexs and length as zero...");
-            try
-            {
-                if (String.Compare(null, 0, null, 0, 0, StringComparison.CurrentCultureIgnoreCase) != 0)
-                {
-                    TestLibrary.TestFramework.LogError("011", "Copmare failed!");
-                    retVal = false;
-                }
-            }
-            catch (ArgumentOutOfRangeException)
-            {
-                TestLibrary.TestFramework.LogError("012", "ArgumentOutOfRangeException is thrown when a given index is out of range!");
-            }
-            catch (Exception e)
-            {
-                TestLibrary.TestFramework.LogError("013", "Unexpected exception: " + e);
-                retVal = false;
-            }
-
-            return retVal;
-        }
-
-        /// <summary>
-        /// Compare two strings which one of them is null
-        /// </summary>
-        /// <returns></returns>
-        public bool PosTest4()
-        {
-            bool retVal = true;
-
-            TestLibrary.TestFramework.BeginScenario("Compare two strings which one of them is null...");
-            try
-            {
-                if (String.Compare(null, 0, str1, 0, 0, StringComparison.CurrentCultureIgnoreCase) >= 0)
-                {
-                    TestLibrary.TestFramework.LogError("023", "Compare failed!");
-                    retVal = false;
-                }
-            }
-            catch (ArgumentOutOfRangeException)
-            {
-                TestLibrary.TestFramework.LogError("024", "ArgumentOutOfRangeException is thrown when one of strings is null!");
-            }
-            catch (Exception e)
-            {
-                TestLibrary.TestFramework.LogError("025", "Unexpected exception: " + e);
-                retVal = false;
-            }
-
-            return retVal;
-        }
-
-        /// <summary>
-        /// Compare the strings with index out of range
-        /// </summary>
-        /// <returns></returns>
-        public bool NegTest1()
-        {
-            bool retVal = true;
-
-            TestLibrary.TestFramework.BeginScenario("Compare the strings with index out of range...");
-            try
-            {
-                if (String.Compare(str1, 11, str2, 11, 3, StringComparison.CurrentCultureIgnoreCase) != 0)
-                {
-                    retVal = false;
-                }
-            }
-            catch (ArgumentOutOfRangeException)
-            {
-   //             TestLibrary.TestFramework.LogError("003", "ArgumentOutOfRangeException is thrown when a given index is out of range!");
-            }
-            catch (Exception e)
-            {
-                TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
-                retVal = false;
-            }
-
-            return retVal;
-        }
-
-        /// <summary>
-        /// Compare the strings with indexes are negative
-        /// </summary>
-        /// <returns></returns>
-        public bool NegTest2()
-        {
-            bool retVal = true;
-
-            TestLibrary.TestFramework.BeginScenario("Compare the strings with indexes are negative...");
-            try
-            {                
-                if (String.Compare(str1, -1, str2, -1, 3, StringComparison.CurrentCultureIgnoreCase) != 0)
-                {
-                    retVal = false;
-                }
-            }
-            catch (ArgumentOutOfRangeException)
-            {
-     //           TestLibrary.TestFramework.LogError("005", "ArgumentOutOfRangeException is thrown when a given indexes are negative!");
-            }
-            catch (Exception e)
-            {
-                TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
-                retVal = false;
-            }
-
-            return retVal;
-        }
-
-        /// <summary>
-        /// Compare the strings with length is negative
-        /// </summary>
-        /// <returns></returns>
-        public bool NegTest3()
-        {
-            bool retVal = true;
-
-            TestLibrary.TestFramework.BeginScenario("Compare the strings with length is negative...");
-            try
-            {
-                if (String.Compare(str1, 0, str2, 0, -1, StringComparison.CurrentCultureIgnoreCase) != 0)
-                {
-                    retVal = false;
-                }
-            }
-            catch (ArgumentOutOfRangeException)
-            {
-  //              TestLibrary.TestFramework.LogError("007", "ArgumentOutOfRangeException is thrown when a given length is negative!");
-            }
-            catch (Exception e)
-            {
-                TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
-                retVal = false;
-            }
-
-            return retVal;
-        }
-
-        /// <summary>
-        /// Compare two null strings with length out of range
-        /// </summary>
-        /// <returns></returns>
-        public bool NegTest4()
-        {
-            bool retVal = true;
-
-            TestLibrary.TestFramework.BeginScenario("Compare two null strings with length out of range...");
-            try
-            {
-                if (String.Compare(null, 0, null, 0, 1, StringComparison.CurrentCultureIgnoreCase) != 0)
-                {
-                    TestLibrary.TestFramework.LogError("014","Compare failed!");
-                    retVal = false;
-                }
-            }
-            catch (ArgumentOutOfRangeException)
-            {
-   //             TestLibrary.TestFramework.LogError("015", "ArgumentOutOfRangeException is thrown when a given length is out of range!");
-            }
-            catch (Exception e)
-            {
-                TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
-                retVal = false;
-            }
-
-            return retVal;
-        }
-
-        /// <summary>
-        /// Compare two null strings with indexs out of range
-        /// </summary>
-        /// <returns></returns>
-        public bool NegTest5()
-        {
-            bool retVal = true;
-
-            TestLibrary.TestFramework.BeginScenario("Compare two null strings with indexs out of range...");
-            try
-            {
-                if (String.Compare(null, 1, null, 1, 0, StringComparison.CurrentCultureIgnoreCase) != 0)
-                {
-                    TestLibrary.TestFramework.LogError("017","Compare failed!");
-                    retVal = false;
-                }
-            }
-            catch (ArgumentOutOfRangeException)
-            {
-   //             TestLibrary.TestFramework.LogError("018", "ArgumentOutOfRangeException is thrown when a given index is out of range!");
-            }
-            catch (Exception e)
-            {
-                TestLibrary.TestFramework.LogError("019", "Unexpected exception: " + e);
-                retVal = false;
-            }
-
-            return retVal;
-        }
-
-        /// <summary>
-        /// Compare two null strings with indexs are negative
-        /// </summary>
-        /// <returns></returns>
-        public bool NegTest6()
-        {
-            bool retVal = true;
-
-            TestLibrary.TestFramework.BeginScenario("Compare two null strings with indexs are negative...");
-            try
-            {
-                if (String.Compare(null, -1, null, -1, 0, StringComparison.CurrentCultureIgnoreCase) != 0)
-                {
-                    TestLibrary.TestFramework.LogError("020","Compare failed!");
-                    retVal = false;
-                }
-            }
-            catch (ArgumentOutOfRangeException)
-            {
- //               TestLibrary.TestFramework.LogError("021", "ArgumentOutOfRangeException is thrown when a given indexes are negative!");
-            }
-            catch (Exception e)
-            {
-                TestLibrary.TestFramework.LogError("022", "Unexpected exception: " + e);
-                retVal = false;
-            }
-
-            return retVal;
-        }
-
-        /// <summary>
-        /// Compare two strings which one of them is null and the length is not zero
-        /// </summary>
-        /// <returns></returns>
-        public bool NegTest7()
-        {
-            bool retVal = true;
-
-            TestLibrary.TestFramework.BeginScenario("Compare two strings which one of them is null and the length is not zero...");
-            try
-            {
-                if (String.Compare(null, 0, str1, 0, 1, StringComparison.CurrentCultureIgnoreCase) >= 0)
-                {
-                    TestLibrary.TestFramework.LogError("026","Compare failed!");
-                    retVal = false;
-                }
-            }
-            catch (ArgumentOutOfRangeException)
-            {
-   //             TestLibrary.TestFramework.LogError("027", "ArgumentOutOfRangeException is thrown when a given length is out of range!");
-            }
-            catch (Exception e)
-            {
-                TestLibrary.TestFramework.LogError("028", "Unexpected exception: " + e);
-                retVal = false;
-            }
-
-            return retVal;
-        }
-
-        /// <summary>
-        /// Compare two strings which one of them is null and the length is negative
-        /// </summary>
-        /// <returns></returns>
-        public bool NegTest8()
-        {
-            bool retVal = true;
-
-            TestLibrary.TestFramework.BeginScenario("Compare two strings which one of them is null and the length is negative...");
-            try
-            {
-                if (String.Compare(null, 0, str1, 0, -1, StringComparison.CurrentCultureIgnoreCase) >= 0)
-                {
-                    TestLibrary.TestFramework.LogError("029","Compare failed!");
-                    retVal = false;
-                }
-            }
-            catch (ArgumentOutOfRangeException)
-            {
-    //            TestLibrary.TestFramework.LogError("030", "ArgumentOutOfRangeException is thrown when a given length is ength is negative!");
-            }
-            catch (Exception e)
-            {
-                TestLibrary.TestFramework.LogError("031", "Unexpected exception: " + e);
-                retVal = false;
-            }
-
-            return retVal;
-        }
-    }
-}