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

Method containsKeyNullTest

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

Source from the content-addressed store, hash-verified

86 // Assumes `put` is implemented properly. This test is a bit tricky - remember that
87 // `containsKey` should only care about the keys, not the values!
88 @Test
89 public void containsKeyNullTest() {
90 BSTMap<String, Integer> b = new BSTMap<>();
91 b.put("hi", null);
92 assertThat(b.get("hi")).isNull();
93 assertThat(b.containsKey("hi")).isTrue();
94 }
95
96 @Test
97 public void treeTest() {

Callers

nothing calls this directly

Calls 3

putMethod · 0.65
getMethod · 0.65
containsKeyMethod · 0.65

Tested by

no test coverage detected