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

Method sanityPutTest

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

Source from the content-addressed store, hash-verified

76
77 // Assumes `get` and `containsKey` are implemented properly.
78 @Test
79 public void sanityPutTest() {
80 BSTMap<String, Integer> b = new BSTMap<>();
81 b.put("hi", 1);
82 assertThat(b.containsKey("hi")).isTrue();
83 assertThat(b.get("hi")).isEqualTo(1);
84 }
85
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!

Callers

nothing calls this directly

Calls 3

putMethod · 0.65
containsKeyMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected