< Summary

Class:KernelCommunication.ByteUtils
Assembly:KernelCommunication.BinaryReader
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/WorldRuntime/KernelCommunication/BinaryMessage/BinaryReader/ByteUtils.cs
Covered lines:3
Uncovered lines:0
Coverable lines:3
Total lines:16
Line coverage:100% (3 of 3)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PointerToInt32(...)0%110100%
PointerToInt64(...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/WorldRuntime/KernelCommunication/BinaryMessage/BinaryReader/ByteUtils.cs

#LineLine coverage
 1namespace KernelCommunication
 2{
 3    public static class ByteUtils
 4    {
 5        public static unsafe int PointerToInt32(byte* ptr)
 6        {
 1217            return (int)*ptr << 24 | (int)ptr[1] << 16 | (int)ptr[2] << 8 | (int)ptr[3];
 8        }
 9
 10        public static unsafe long PointerToInt64(byte* ptr)
 11        {
 2312            int num = (int)*ptr << 24 | (int)ptr[1] << 16 | (int)ptr[2] << 8 | (int)ptr[3];
 2313            return (long)((uint)((int)ptr[4] << 24 | (int)ptr[5] << 16 | (int)ptr[6] << 8) | (uint)ptr[7]) | (long)num <
 14        }
 15    }
 16}