< Summary

Class:ReorderableList.ReorderableArray[T]
Assembly:Utils
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Helpers/Utils/ReorderableArray/ReorderableArray.cs
Covered lines:9
Uncovered lines:13
Coverable lines:22
Total lines:60
Line coverage:40.9% (9 of 22)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
ReorderableArray(...)0%110100%
ReorderableArray()0%110100%
Clone()0%2100%
CopyFrom(...)0%2100%
Contains(...)0%2100%
IndexOf(...)0%2100%
Insert(...)0%2100%
RemoveAt(...)0%2100%
Add(...)0%110100%
Clear()0%110100%
CopyTo(...)0%110100%
Remove(...)0%2100%
ToArray()0%2100%
GetEnumerator()0%110100%
GetEnumerator()0%2100%

File(s)

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

#LineLine coverage
 1using UnityEngine;
 2using System;
 3using System.Collections;
 4using System.Collections.Generic;
 5
 6namespace ReorderableList
 7{
 8
 9    [Serializable]
 10    public abstract class ReorderableArray<T> : ICloneable, IList<T>, ICollection<T>, IEnumerable<T>
 11    {
 12
 13        [SerializeField]
 1177514        private List<T> array = new List<T>();
 15
 16        public ReorderableArray()
 2355017            : this(0) { }
 18
 3532519        public ReorderableArray(int length) { array = new List<T>(length); }
 20
 1612021        public T this[int index] { get { return array[index]; } set { array[index] = value; } }
 22
 023        public int Length { get { return array.Count; } }
 24
 025        public bool IsReadOnly { get { return false; } }
 26
 727        public int Count { get { return array.Count; } }
 28
 029        public object Clone() { return new List<T>(array); }
 30
 31        public void CopyFrom(IEnumerable<T> value)
 32        {
 33
 034            array.Clear();
 035            array.AddRange(value);
 036        }
 37
 038        public bool Contains(T value) { return array.Contains(value); }
 39
 040        public int IndexOf(T value) { return array.IndexOf(value); }
 41
 042        public void Insert(int index, T item) { array.Insert(index, item); }
 43
 044        public void RemoveAt(int index) { array.RemoveAt(index); }
 45
 846        public void Add(T item) { array.Add(item); }
 47
 248        public void Clear() { array.Clear(); }
 49
 1450        public void CopyTo(T[] array, int arrayIndex) { this.array.CopyTo(array, arrayIndex); }
 51
 052        public bool Remove(T item) { return array.Remove(item); }
 53
 054        public T[] ToArray() { return array.ToArray(); }
 55
 130756        public IEnumerator<T> GetEnumerator() { return array.GetEnumerator(); }
 57
 058        IEnumerator IEnumerable.GetEnumerator() { return array.GetEnumerator(); }
 59    }
 60}