Add tests to increase coverage of WindowCache
commitc8e79011054618d83a366633961942daad818ec1
authorShawn O. Pearce <spearce@spearce.org>
Wed, 29 Apr 2009 18:54:48 +0000 (29 11:54 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Wed, 29 Apr 2009 23:49:07 +0000 (30 01:49 +0200)
tree10f5eeb8b0db34c890f87d2cdc1ea52ceb7a7eb5
parent5ba1148c004733c96e9544d84820b7fc95655f0c
Add tests to increase coverage of WindowCache

These tests run the WindowCache in different configurations with known
inputs, forcing it through different code paths as the cache populates
with entries, and potentially overflows.

The list of objects was derived from `git verify-pack -v`, run over all
of the pack files we install by default into a RepositoryTestCase.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/test/resources/all_packed_objects.txt [new file with mode: 0644]
org.spearce.jgit.test/tst/org/spearce/jgit/lib/WindowCacheGetTest.java [new file with mode: 0644]
org.spearce.jgit/src/org/spearce/jgit/lib/PackedObjectLoader.java
org.spearce.jgit/src/org/spearce/jgit/lib/WindowCache.java