Skip to content

Commit f40e335

Browse files
committed
Added Treap class and test for the same
1 parent 019d8d3 commit f40e335

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/test/java/com/thealgorithms/datastructures/trees/TreapTest.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
public class TreapTest {
88

99
@Test
10-
void build() {
10+
public void build() {
1111
Treap treap = new Treap();
1212
treap.insert(4);
1313
treap.insert(5);
@@ -17,7 +17,7 @@ void build() {
1717
}
1818

1919
@Test
20-
void delete() {
20+
public void delete() {
2121
Treap treap = new Treap();
2222
treap.insert(5);
2323
treap.insert(9);
@@ -31,7 +31,7 @@ void delete() {
3131
}
3232

3333
@Test
34-
void searchAndFound() {
34+
public void searchAndFound() {
3535
Treap treap = new Treap();
3636
treap.insert(5);
3737
treap.insert(9);
@@ -40,11 +40,11 @@ void searchAndFound() {
4040
treap.insert(3);
4141
treap.insert(8);
4242
treap.insert(1);
43-
assertEquals(5, treap.search(5).value());
43+
assertEquals(5, treap.search(5).value);
4444
}
4545

4646
@Test
47-
void searchAndNotFound() {
47+
public void searchAndNotFound() {
4848
Treap treap = new Treap();
4949
treap.insert(5);
5050
treap.insert(9);
@@ -57,7 +57,7 @@ void searchAndNotFound() {
5757
}
5858

5959
@Test
60-
void lowerBound() {
60+
public void lowerBound() {
6161
Treap treap = new Treap();
6262
treap.insert(5);
6363
treap.insert(9);
@@ -70,7 +70,7 @@ void lowerBound() {
7070
}
7171

7272
@Test
73-
void upperBound() {
73+
public void upperBound() {
7474
Treap treap = new Treap();
7575
treap.insert(5);
7676
treap.insert(9);
@@ -83,7 +83,7 @@ void upperBound() {
8383
}
8484

8585
@Test
86-
void misc() {
86+
public void misc() {
8787
Treap treap = new Treap();
8888
treap.insert(5);
8989
treap.insert(9);

0 commit comments

Comments
 (0)