| 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()); |