MCPcopy Create free account
hub / github.com/Berkeley-CS61B/skeleton-sp23 / testSum

Method testSum

lab01/tests/ArithmeticTest.java:25–33  ·  view source on GitHub ↗

Performs a few arbitrary tests to see if the sum method is correct

()

Source from the content-addressed store, hash-verified

23
24 /** Performs a few arbitrary tests to see if the sum method is correct */
25 @Test
26 @Order(1)
27 @DisplayName("Test sum correctness")
28 public void testSum() {
29 assertThat(Arithmetic.sum(5, 6)).isEqualTo(11);
30 assertThat(Arithmetic.sum(5, -6)).isEqualTo(-1);
31 assertThat(Arithmetic.sum(0, -6)).isEqualTo(-6);
32 assertThat(Arithmetic.sum(6, -6)).isEqualTo(0);
33 }
34}

Callers

nothing calls this directly

Calls 1

sumMethod · 0.95

Tested by

no test coverage detected