< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 26
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
GetStringComparer(...)0%440%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationExtensions.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4namespace System.Globalization
 5{
 6    public static class GlobalizationExtensions
 7    {
 8        public static StringComparer GetStringComparer(this CompareInfo compareInfo, CompareOptions options)
 9        {
 010            ArgumentNullException.ThrowIfNull(compareInfo);
 11
 012            if (options == CompareOptions.Ordinal)
 13            {
 014                return StringComparer.Ordinal;
 15            }
 16
 017            if (options == CompareOptions.OrdinalIgnoreCase)
 18            {
 019                return StringComparer.OrdinalIgnoreCase;
 20            }
 21
 022            return new CultureAwareComparer(compareInfo, options);
 23        }
 24    }
 25}
 26