< Summary

Information
Class: IceRpc.Internal.SliceDecoderExtensions
Assembly: IceRpc
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Internal/SliceDecoderExtensions.cs
Tag: 275_13775359185
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 20
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage
100%
Covered methods: 1
Total methods: 1
Method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
CheckEndOfBuffer(...)100%22100%

File(s)

/home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Internal/SliceDecoderExtensions.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using ZeroC.Slice;
 4
 5namespace IceRpc.Internal;
 6
 7/// <summary>Provides an extension method for <see cref="SliceDecoder" /> to check if the end of the decoder's
 8/// underlying buffer is reached.</summary>
 9internal static class SliceDecoderExtensions
 10{
 11    /// <summary>Verifies the Slice decoder has reached the end of its underlying buffer.</summary>
 12    /// <param name="decoder">The Slice decoder.</param>
 13    internal static void CheckEndOfBuffer(this ref SliceDecoder decoder)
 2255214    {
 2255215        if (!decoder.End)
 616        {
 617            throw new InvalidDataException($"There are {decoder.Remaining} bytes remaining in the buffer.");
 18        }
 2254619    }
 20}