MSTestExtensions/CombinatorialTestMethodAttribute.cs
/// <summary>
/// Computes the total number of digits in the test count.
/// Used to figure out how much to pad the test # for <see cref="TestResult.DisplayName"/>.
/// </summary>
/// <param name="arguments">The set of values for each parameter, as returned by <see cref="GetArgumentsInOrder"/>.</param>
/// <returns>The number of digits in the test count.</returns>
Computes the total number of digits in the test count.
Used to figure out how much to pad the test # for .
Computes the total number of digits in the test count . Used to figure out how much to pad the test # for .
private static int ComputeTotalTestCountDigits(object[][] arguments)
        {
            try
            {
                long totalTests = 1;
                checked
                {
                    foreach (object[] list in arguments)
                    {
                        totalTests *= list.Length;
                    }
                }
                return (int)Math.Ceiling(Math.Log10(totalTests));
            }
            catch (OverflowException)
            {
                return 1;
            }
        }
private static int ComputeTotalTestCountDigits ( object [ ] [ ] arguments ) { try { long totalTests = 1 ; checked { foreach ( object [ ] list in arguments ) { totalTests *= list . Length ; } } return ( int ) Math . Ceiling ( Math . Log10 ( totalTests ) ) ; } catch ( OverflowException ) { return 1 ; } }
Computes the total number of digits in the test count.
Computes the total number of digits in the test count .
The number of digits in the test count.
The number of digits in the test count .
arguments
object[][]
The set of values for each parameter, as returned by .
The set of values for each parameter as returned by .