File tree Expand file tree Collapse file tree 5 files changed +22
-20
lines changed
Hyperbee.Collections.Benchmark
Hyperbee.Collections.Tests Expand file tree Collapse file tree 5 files changed +22
-20
lines changed Original file line number Diff line number Diff line change 88using BenchmarkDotNet . Validators ;
99
1010namespace Hyperbee . Collections . Benchmark ;
11+
1112public class BenchmarkConfig
1213{
1314 public class Config : ManualConfig
Original file line number Diff line number Diff line change 44#pragma warning disable CA1806
55
66namespace Hyperbee . Collections . Benchmark ;
7+
78public class CollectionsBenchmark
89{
910 private const char Separator = ',' ;
Original file line number Diff line number Diff line change @@ -32,12 +32,12 @@ public void Indexer_ShouldThrow_WhenOutOfRange()
3232 {
3333 _ = array [ 0 ] ;
3434 }
35- catch ( ArgumentOutOfRangeException )
35+ catch ( ArgumentOutOfRangeException )
3636 {
3737 exception = true ;
3838 }
39-
40- Assert . IsTrue ( exception , "Expected ArgumentOutOfRangeException was not thrown" ) ;
39+
40+ Assert . IsTrue ( exception , "Expected ArgumentOutOfRangeException was not thrown" ) ;
4141 }
4242
4343 [ TestMethod ]
@@ -71,14 +71,14 @@ public void Dispose_ShouldReleaseMemory()
7171 var exception = false ;
7272 try
7373 {
74- array . Add ( 1 ) ;
74+ array . Add ( 1 ) ;
7575 }
76- catch ( ObjectDisposedException )
76+ catch ( ObjectDisposedException )
7777 {
7878 exception = true ;
7979 }
80-
81- Assert . IsTrue ( exception , "Expected ObjectDisposedException was not thrown" ) ;
80+
81+ Assert . IsTrue ( exception , "Expected ObjectDisposedException was not thrown" ) ;
8282 }
8383
8484 [ TestMethod ]
Original file line number Diff line number Diff line change @@ -47,12 +47,12 @@ public void Pop_ShouldThrow_WhenStackIsEmpty()
4747 {
4848 stack . Pop ( ) ;
4949 }
50- catch ( InvalidOperationException )
50+ catch ( InvalidOperationException )
5151 {
5252 exception = true ;
5353 }
54-
55- Assert . IsTrue ( exception , "Expected InvalidOperationException was not thrown" ) ;
54+
55+ Assert . IsTrue ( exception , "Expected InvalidOperationException was not thrown" ) ;
5656 }
5757
5858 [ TestMethod ]
@@ -99,13 +99,13 @@ public void Dispose_ShouldReleaseMemory()
9999 var exception = false ;
100100 try
101101 {
102- stack . Push ( 1 ) ;
102+ stack . Push ( 1 ) ;
103103 }
104- catch ( ObjectDisposedException )
104+ catch ( ObjectDisposedException )
105105 {
106106 exception = true ;
107107 }
108-
109- Assert . IsTrue ( exception , "Expected ObjectDisposedException was not thrown" ) ;
108+
109+ Assert . IsTrue ( exception , "Expected ObjectDisposedException was not thrown" ) ;
110110 }
111111}
Original file line number Diff line number Diff line change 1- using Microsoft . VisualStudio . TestTools . UnitTesting ;
2- using System ;
1+ using System ;
32using System . Linq ;
3+ using Microsoft . VisualStudio . TestTools . UnitTesting ;
44
55namespace Hyperbee . Collections . Tests ;
66
@@ -112,14 +112,14 @@ public void Find_NonExistentItem_ShouldThrowException()
112112 var exception = false ;
113113 try
114114 {
115- disjointSet . Find ( 1 ) ;
115+ disjointSet . Find ( 1 ) ;
116116 }
117- catch ( InvalidOperationException )
117+ catch ( InvalidOperationException )
118118 {
119119 exception = true ;
120120 }
121-
122- Assert . IsTrue ( exception , "Expected InvalidOperationException was not thrown" ) ;
121+
122+ Assert . IsTrue ( exception , "Expected InvalidOperationException was not thrown" ) ;
123123 }
124124
125125 [ TestMethod ]
You can’t perform that action at this time.
0 commit comments