public static void RunTests()
    {
        // The current implementation uses the same character as the default NumberDecimalSeparator
        // for a culture, but this is an implementation detail and could change.  No user overrides
        // are respected.
        String GDecimalSeparator = Utilities.CurrentCulture.NumberFormat.NumberDecimalSeparator;

        // Standard formats
        foreach (TimeSpan ts in Support.InterestingTimeSpans)
        {
            String defaultFormat = Support.CFormat(ts);
            VerifyToString(ts, defaultFormat); // no regressions
            VerifyToString(ts, "c", defaultFormat);
            VerifyToString(ts, "t", defaultFormat);
            VerifyToString(ts, "T", defaultFormat);
            VerifyToString(ts, null, defaultFormat);
            VerifyToString(ts, "", defaultFormat);
            VerifyToString(ts, "g", Support.gFormat(ts, GDecimalSeparator));
            VerifyToString(ts, "G", Support.GFormat(ts, GDecimalSeparator));
        }

        // Custom formats
        TimeSpan ts1 = new TimeSpan(1, 2, 3, 4, 56);

        VerifyToString(ts1, "d'-'", "1-");
        VerifyToString(ts1, "%d", "1");
        VerifyToString(ts1, "dd", "01");
        VerifyToString(ts1, "ddd", "001");
        VerifyToString(ts1, "dddd", "0001");
        VerifyToString(ts1, "ddddd", "00001");
        VerifyToString(ts1, "dddddd", "000001");
        VerifyToString(ts1, "ddddddd", "0000001");
        VerifyToString(ts1, "dddddddd", "00000001");
        VerifyToString(ts1, "h'-'", "2-");
        VerifyToString(ts1, "%h", "2");
        VerifyToString(ts1, "hh", "02");
        VerifyToString(ts1, "m'-'", "3-");
        VerifyToString(ts1, "%m", "3");
        VerifyToString(ts1, "mm", "03");
        VerifyToString(ts1, "s'-'", "4-");
        VerifyToString(ts1, "%s", "4");
        VerifyToString(ts1, "ss", "04");
        VerifyToString(ts1, "f'-'", "0-");
        VerifyToString(ts1, "ff", "05");
        VerifyToString(ts1, "fff", "056");
        VerifyToString(ts1, "ffff", "0560");
        VerifyToString(ts1, "fffff", "05600");
        VerifyToString(ts1, "ffffff", "056000");
        VerifyToString(ts1, "fffffff", "0560000");
        VerifyToString(ts1, "F'-'", "-");
        VerifyToString(ts1, "FF", "05");
        VerifyToString(ts1, "FFF", "056");
        VerifyToString(ts1, "FFFF", "056");
        VerifyToString(ts1, "FFFFF", "056");
        VerifyToString(ts1, "FFFFFF", "056");
        VerifyToString(ts1, "FFFFFFF", "056");
        VerifyToString(ts1, "hhmmss", "020304");

        ts1 = new TimeSpan(-1, -2, -3, -4, -56);
        VerifyToString(ts1, "d'-'", "1-");
        VerifyToString(ts1, "%d", "1");
        VerifyToString(ts1, "dd", "01");
        VerifyToString(ts1, "ddd", "001");
        VerifyToString(ts1, "dddd", "0001");
        VerifyToString(ts1, "ddddd", "00001");
        VerifyToString(ts1, "dddddd", "000001");
        VerifyToString(ts1, "ddddddd", "0000001");
        VerifyToString(ts1, "dddddddd", "00000001");
        VerifyToString(ts1, "h'-'", "2-");
        VerifyToString(ts1, "%h", "2");
        VerifyToString(ts1, "hh", "02");
        VerifyToString(ts1, "m'-'", "3-");
        VerifyToString(ts1, "%m", "3");
        VerifyToString(ts1, "mm", "03");
        VerifyToString(ts1, "s'-'", "4-");
        VerifyToString(ts1, "%s", "4");
        VerifyToString(ts1, "ss", "04");
        VerifyToString(ts1, "f'-'", "0-");
        VerifyToString(ts1, "ff", "05");
        VerifyToString(ts1, "fff", "056");
        VerifyToString(ts1, "ffff", "0560");
        VerifyToString(ts1, "fffff", "05600");
        VerifyToString(ts1, "ffffff", "056000");
        VerifyToString(ts1, "fffffff", "0560000");
        VerifyToString(ts1, "F'-'", "-");
        VerifyToString(ts1, "FF", "05");
        VerifyToString(ts1, "FFF", "056");
        VerifyToString(ts1, "FFFF", "056");
        VerifyToString(ts1, "FFFFF", "056");
        VerifyToString(ts1, "FFFFFF", "056");
        VerifyToString(ts1, "FFFFFFF", "056");
        VerifyToString(ts1, "hhmmss", "020304");

        ts1 = new TimeSpan(1, 2, 3, 4, 56).Add(new TimeSpan(78));
        VerifyToString(ts1, "'.'F", ".");
        VerifyToString(ts1, "FF", "05");
        VerifyToString(ts1, "FFF", "056");
        VerifyToString(ts1, "FFFF", "056");
        VerifyToString(ts1, "FFFFF", "056");
        VerifyToString(ts1, "FFFFFF", "056007");
        VerifyToString(ts1, "FFFFFFF", "0560078");

        ts1 = new TimeSpan(1, 2, 3, 4).Add(new TimeSpan(789));
        VerifyToString(ts1, "'.'F", ".");
        VerifyToString(ts1, "FF", "");
        VerifyToString(ts1, "FFF", "");
        VerifyToString(ts1, "FFFF", "");
        VerifyToString(ts1, "FFFFF", "00007");
        VerifyToString(ts1, "FFFFFF", "000078");
        VerifyToString(ts1, "FFFFFFF", "0000789");

        // Literals
        ts1 = new TimeSpan(1, 2, 3, 4, 56).Add(new TimeSpan(78));
        VerifyToString(ts1, "d'd'", "1d");
        VerifyToString(ts1, "d' days'", "1 days");
        VerifyToString(ts1, "d' days, 'h' hours, 'm' minutes, 's'.'FFFF' seconds'", "1 days, 2 hours, 3 minutes, 4.056 seconds");

        // Error formats
        foreach (String errorFormat in Support.ErrorFormats)
        {
            ts1 = new TimeSpan(1, 2, 3, 4, 56).Add(new TimeSpan(78));
            VerifyToStringException <FormatException>(ts1, errorFormat);
        }


        // Vary current culture
        Utilities.CurrentCulture = CultureInfo.InvariantCulture;
        foreach (TimeSpan ts in Support.InterestingTimeSpans)
        {
            String defaultFormat = Support.CFormat(ts);
            VerifyToString(ts, defaultFormat);
            VerifyToString(ts, "c", defaultFormat);
            VerifyToString(ts, "t", defaultFormat);
            VerifyToString(ts, "T", defaultFormat);
            VerifyToString(ts, null, defaultFormat);
            VerifyToString(ts, "", defaultFormat);
            VerifyToString(ts, "g", Support.gFormat(ts, "."));
            VerifyToString(ts, "G", Support.GFormat(ts, "."));
        }

        Utilities.CurrentCulture = new CultureInfo("en-US");
        foreach (TimeSpan ts in Support.InterestingTimeSpans)
        {
            String defaultFormat = Support.CFormat(ts);
            VerifyToString(ts, defaultFormat);
            VerifyToString(ts, "c", defaultFormat);
            VerifyToString(ts, "t", defaultFormat);
            VerifyToString(ts, "T", defaultFormat);
            VerifyToString(ts, null, defaultFormat);
            VerifyToString(ts, "", defaultFormat);
            VerifyToString(ts, "g", Support.gFormat(ts, "."));
            VerifyToString(ts, "G", Support.GFormat(ts, "."));
        }

        Utilities.CurrentCulture = new CultureInfo("de-DE");
        foreach (TimeSpan ts in Support.InterestingTimeSpans)
        {
            String defaultFormat = Support.CFormat(ts);
            VerifyToString(ts, defaultFormat);
            VerifyToString(ts, "c", defaultFormat);
            VerifyToString(ts, "t", defaultFormat);
            VerifyToString(ts, "T", defaultFormat);
            VerifyToString(ts, null, defaultFormat);
            VerifyToString(ts, "", defaultFormat);
            VerifyToString(ts, "g", Support.gFormat(ts, ","));
            VerifyToString(ts, "G", Support.GFormat(ts, ","));
        }
    }