< Summary

Class:TextureUtils
Assembly:TextureUtils
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Helpers/Utils/TextureUtils/TextureUtils.cs
Covered lines:8
Uncovered lines:2
Coverable lines:10
Total lines:20
Line coverage:80% (8 of 10)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
TextureUtils()0%110100%
IsQuestionMarkPNG(...)0%6.226081.82%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Helpers/Utils/TextureUtils/TextureUtils.cs

#LineLine coverage
 1using UnityEngine;
 2
 3public static class TextureUtils
 4{
 15    static readonly byte[] questionMarkPNG = { 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 8,
 6    public static bool IsQuestionMarkPNG(Texture tex)
 7    {
 13768        if (!tex)
 09            return true;
 10
 137611        if (tex.width != 8 || tex.height != 8)
 137512            return false;
 13
 114        byte[] png1 = (tex as Texture2D).EncodeToPNG();
 24615        for (int i = 0; i < questionMarkPNG.Length; i++)
 12216            if (!png1[i].Equals(questionMarkPNG[i]))
 017                return false;
 118        return true;
 19    }
 20}