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

Method sanitySizeTest

lab07/tests/TestBSTMap.java:65–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63
64 // Assumes `put` is implemented properly.
65 @Test
66 public void sanitySizeTest() {
67 BSTMap<String, Integer> b = new BSTMap<>();
68 assertThat(b.size()).isEqualTo(0);
69 b.put("hi", 1);
70 assertThat(b.size()).isEqualTo(1);
71 for (int i = 0; i < 455; i++) {
72 b.put("hi" + i, 1);
73 }
74 assertThat(b.size()).isEqualTo(456);
75 }
76
77 // Assumes `get` and `containsKey` are implemented properly.
78 @Test

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.65
putMethod · 0.65

Tested by

no test coverage detected