File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed
Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -66,4 +66,12 @@ public final class EnvInfo {
6666 this .numReaders = numReaders ;
6767 }
6868
69+ @ Override
70+ public String toString () {
71+ return "EnvInfo{" + "lastPageNumber=" + lastPageNumber
72+ + ", lastTransactionId=" + lastTransactionId + ", mapAddress="
73+ + mapAddress + ", mapSize=" + mapSize + ", maxReaders="
74+ + maxReaders + ", numReaders=" + numReaders + '}' ;
75+ }
76+
6977}
Original file line number Diff line number Diff line change @@ -67,4 +67,12 @@ public final class Stat {
6767 this .entries = entries ;
6868 }
6969
70+ @ Override
71+ public String toString () {
72+ return "Stat{" + "branchPages=" + branchPages + ", depth=" + depth
73+ + ", entries=" + entries + ", leafPages=" + leafPages
74+ + ", overflowPages=" + overflowPages + ", pageSize=" + pageSize
75+ + '}' ;
76+ }
77+
7078}
Original file line number Diff line number Diff line change 2626import java .nio .ByteBuffer ;
2727import static java .nio .ByteBuffer .allocateDirect ;
2828import java .util .Random ;
29+ import static org .hamcrest .CoreMatchers .containsString ;
2930import static org .hamcrest .CoreMatchers .is ;
3031import static org .hamcrest .CoreMatchers .notNullValue ;
3132import static org .hamcrest .MatcherAssert .assertThat ;
@@ -224,6 +225,7 @@ public void info() throws IOException {
224225 assertThat (info .mapSize , is (123_456L ));
225226 assertThat (info .maxReaders , is (4 ));
226227 assertThat (info .numReaders , is (0 ));
228+ assertThat (info .toString (), containsString ("maxReaders=" ));
227229 assertThat (env .getMaxKeySize (), is (511 ));
228230 }
229231 }
@@ -275,6 +277,7 @@ public void stats() throws IOException {
275277 assertThat (stat .leafPages , is (0L ));
276278 assertThat (stat .overflowPages , is (0L ));
277279 assertThat (stat .pageSize , is (4_096 ));
280+ assertThat (stat .toString (), containsString ("pageSize=" ));
278281 }
279282 }
280283
You can’t perform that action at this time.
0 commit comments