MCPcopy Index your code
hub / github.com/golang/mobile / testRefMap

Method testRefMap

bind/java/SeqTest.java:37–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 }
36
37 public void testRefMap() {
38 // Ensure that the RefMap.live count is kept in sync
39 // even a particular reference number is removed and
40 // added again
41 Seq.RefMap m = new Seq.RefMap();
42 Seq.Ref r = new Seq.Ref(1, null);
43 m.put(r.refnum, r);
44 m.remove(r.refnum);
45 m.put(r.refnum, r);
46 // Force the RefMap to grow, to activate the sanity
47 // checking of the live count in RefMap.grow.
48 for (int i = 2; i < 24; i++) {
49 m.put(i, new Seq.Ref(i, null));
50 }
51 }
52
53 public void testVar() {
54 assertEquals("var StringVar", "a string var", Testpkg.getStringVar());

Callers

nothing calls this directly

Calls 2

putMethod · 0.95
removeMethod · 0.95

Tested by

no test coverage detected