< Summary

Line coverage
71%
Covered lines: 5
Uncovered lines: 2
Coverable lines: 7
Total lines: 31
Line coverage: 71.4%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
GetValues()100%110%
ContainsCore(...)100%11100%
IndexOfAny(...)100%11100%
IndexOfAnyExcept(...)100%22100%
LastIndexOfAny(...)100%11100%
LastIndexOfAnyExcept(...)100%11100%
IndexOfAnyMultiString(...)100%110%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Private.CoreLib/src/System/SearchValues/EmptySearchValues.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.Buffers
 5{
 6    internal sealed class EmptySearchValues<T> : SearchValues<T>
 7        where T : IEquatable<T>?
 8    {
 9        internal override T[] GetValues() =>
 010            [];
 11
 12        internal override bool ContainsCore(T value) =>
 5586613            false;
 14
 15        internal override int IndexOfAny(ReadOnlySpan<T> span) =>
 130516            -1;
 17
 18        internal override int IndexOfAnyExcept(ReadOnlySpan<T> span) =>
 130519            span.IsEmpty ? -1 : 0;
 20
 21        internal override int LastIndexOfAny(ReadOnlySpan<T> span) =>
 87022            -1;
 23
 24        internal override int LastIndexOfAnyExcept(ReadOnlySpan<T> span) =>
 87025            span.Length - 1;
 26
 27        internal override int IndexOfAnyMultiString(ReadOnlySpan<char> span) =>
 028            -1;
 29    }
 30}
 31