Conversation
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Text; | ||
| using System.Threading.Tasks; | ||
|
|
||
| namespace SkipList.Tests | ||
| { | ||
| class _ | ||
| { | ||
| } | ||
| } |
|
|
||
| var skipList = new SkipList<int>(); | ||
|
|
||
| skipList.Add(10); No newline at end of file |
There was a problem hiding this comment.
Да это вообще было не нужно, сделали бы основной проект типа Library
| @@ -0,0 +1,25 @@ | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
There was a problem hiding this comment.
Проекты в .NET по традиции именуются с заглавной, как и директории, в которых они находятся.
| [Test] | ||
| public void CopyTo_CorrectData_ShouldCopyItCorrectly() | ||
| { | ||
| var testSkipList = new SkipList<int>(); |
There was a problem hiding this comment.
Можно было три скиплиста (разных типов) вынести в поле, инициализировать их все в SetUp, и не писать их инициализацию в каждом тесте
|
|
||
| Assert.That(testSkipList.Count, Is.EqualTo(3)); | ||
|
|
||
| int[] array = new int[3]; |
There was a problem hiding this comment.
| int[] array = new int[3]; | |
| var array = new int[3]; |
| if (comparer == null) | ||
| { | ||
| throw new ArgumentNullException(nameof(comparer)); | ||
| } |
There was a problem hiding this comment.
| if (comparer == null) | |
| { | |
| throw new ArgumentNullException(nameof(comparer)); | |
| } | |
| ArgumentNullException.ThrowIfNull(comparer); |
| Node[] update = new Node[MaxLevel]; | ||
| int[] index = new int[MaxLevel]; |
There was a problem hiding this comment.
| Node[] update = new Node[MaxLevel]; | |
| int[] index = new int[MaxLevel]; | |
| var update = new Node[MaxLevel]; | |
| var index = new int[MaxLevel]; |
И ниже. Не пишите один тип дважды
| { | ||
| for (int i = 0; i < MaxLevel; ++i) | ||
| { | ||
| this.head.Next[i] = null; |
There was a problem hiding this comment.
Надо, чтобы компилировалось без предупреждений
|
|
||
| if (array.Length - arrayIndex < this.count) | ||
| { | ||
| throw new ArgumentException(); |
There was a problem hiding this comment.
Вот тут можно было в Message указать, в чём дело
| public void Insert(int index, T item) | ||
| { | ||
| throw new NotImplementedException(); | ||
| } |
There was a problem hiding this comment.
| public void Insert(int index, T item) | |
| { | |
| throw new NotImplementedException(); | |
| } | |
| public void Insert(int index, T item) | |
| => throw new NotImplementedException(); |
No description provided.