MCPcopy Create free account
hub / github.com/BaseXdb/basex / run

Method run

basex-core/src/test/java/org/basex/util/CompressTest.java:101–111  ·  view source on GitHub ↗

Tests the correctness of the compressed tokens. @param tokens test tokens

(final byte[]... tokens)

Source from the content-addressed store, hash-verified

99 * @param tokens test tokens
100 */
101 private static void run(final byte[]... tokens) {
102 for(final byte[] token : tokens) {
103 final byte[] cpr = Compress.pack(token);
104 if(token != cpr) {
105 final byte[] pln = Compress.unpack(cpr);
106 if(!eq(token, pln)) {
107 fail("\n[E] " + Arrays.toString(token) + ",\n[F] " + Arrays.toString(pln));
108 }
109 }
110 }
111 }
112}

Callers 7

test1Method · 0.95
test2Method · 0.95
test3Method · 0.95
test4Method · 0.95
test5Method · 0.95
test6Method · 0.95
textsMethod · 0.95

Calls 4

packMethod · 0.95
unpackMethod · 0.95
eqMethod · 0.65
toStringMethod · 0.65

Tested by

no test coverage detected