< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 31
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
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%110%
IndexOfAny(...)100%110%
IndexOfAnyExcept(...)0%220%
LastIndexOfAny(...)100%110%
LastIndexOfAnyExcept(...)100%110%
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) =>
 013            false;
 14
 15        internal override int IndexOfAny(ReadOnlySpan<T> span) =>
 016            -1;
 17
 18        internal override int IndexOfAnyExcept(ReadOnlySpan<T> span) =>
 019            span.IsEmpty ? -1 : 0;
 20
 21        internal override int LastIndexOfAny(ReadOnlySpan<T> span) =>
 022            -1;
 23
 24        internal override int LastIndexOfAnyExcept(ReadOnlySpan<T> span) =>
 025            span.Length - 1;
 26
 27        internal override int IndexOfAnyMultiString(ReadOnlySpan<char> span) =>
 028            -1;
 29    }
 30}
 31