Skip to content

Commit 1afb3e6

Browse files
author
patched.codes[bot]
committed
Patched tests/cicd/generate_docstring/test_file.py
1 parent 10a0caa commit 1afb3e6

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import static org.junit.Assert.assertEquals;
2+
import java.util.function.Function;
3+
import org.junit.Test;
4+
5+
public class TestTest {
6+
7+
@Test
8+
public void testAPlusBIntegers() {
9+
int result = Test.a_plus_b(2, 3);
10+
assertEquals(5, result);
11+
}
12+
13+
@Test
14+
public void testAPlusBKeyMap() {
15+
Function<Object, Comparable> keymap = obj -> (int) obj;
16+
int resultEqual = Test.a_plus_b(keymap, 5, 5);
17+
int resultLessThan = Test.a_plus_b(keymap, 3, 5);
18+
int resultGreaterThan = Test.a_plus_b(keymap, 7, 5);
19+
20+
assertEquals(0, resultEqual);
21+
assertEquals(-1, resultLessThan);
22+
assertEquals(1, resultGreaterThan);
23+
}
24+
}

0 commit comments

Comments
 (0)