File tree 2 files changed +3
-17
lines changed
UnitTest/DataStructuresTests
2 files changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -194,20 +194,15 @@ public bool Remove(T item, out T deleted)
194
194
/// </summary>
195
195
public bool Contains ( T item )
196
196
{
197
- return Find ( item , out var _ ) ;
197
+ T itemOut ;
198
+ return Find ( item , out itemOut ) ;
198
199
}
199
200
200
201
/// <summary>
201
202
/// Look for an element and return it if found
202
203
/// </summary>
203
204
public bool Find ( T item , out T result )
204
205
{
205
- result = default ;
206
- if ( IsEmpty )
207
- {
208
- return false ;
209
- }
210
-
211
206
var current = _firstNode ;
212
207
213
208
// Walk after all the nodes that have values less than the node we are looking for
@@ -224,6 +219,7 @@ public bool Find(T item, out T result)
224
219
return true ;
225
220
}
226
221
222
+ result = default ( T ) ;
227
223
return false ;
228
224
}
229
225
Original file line number Diff line number Diff line change @@ -6,16 +6,6 @@ namespace UnitTest.DataStructuresTests
6
6
{
7
7
public static class SkipListTest
8
8
{
9
- [ Fact ]
10
- public static void EmptyList ( )
11
- {
12
- var skipList = new SkipList < int > ( ) ;
13
-
14
- Assert . True ( skipList . Count == 0 ) ;
15
- Assert . True ( skipList . IsEmpty ) ;
16
- Assert . DoesNotContain ( 0 , skipList ) ;
17
- }
18
-
19
9
[ Fact ]
20
10
public static void AddOneElement ( )
21
11
{
You can’t perform that action at this time.
0 commit comments