File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
src/test/java/com/thealgorithms/datastructures/queues Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -203,21 +203,14 @@ void testNullValueHandling() {
203
203
}
204
204
205
205
@ Test
206
- void testDifferentDataTypes () {
207
- // Test queue with different data types
206
+ void testStringDataType () {
207
+ // Test queue with String data type
208
208
Queue <String > stringQueue = new Queue <>(2 );
209
209
stringQueue .insert ("first" );
210
210
stringQueue .insert ("second" );
211
211
212
212
Assertions .assertEquals ("first" , stringQueue .peekFront ());
213
213
Assertions .assertEquals ("second" , stringQueue .peekRear ());
214
-
215
- Queue <Double > doubleQueue = new Queue <>(2 );
216
- doubleQueue .insert (3.14 );
217
- doubleQueue .insert (2.71 );
218
-
219
- Assertions .assertEquals (3.14 , doubleQueue .peekFront ());
220
- Assertions .assertEquals (2.71 , doubleQueue .peekRear ());
221
214
}
222
215
223
216
@ Test
You can’t perform that action at this time.
0 commit comments