30 std::array<uint8_t, 8 * BLOCK_SIZE + 1> buffer_;
31 auto buffer =
subspan(buffer_, 1);
33 data.
buffer = buffer.data();
35 std::string dummyName;
37 auto dummyCallback = [](size_t, size_t) {};
41 SECTION(
"zero sized buffer") {
45 "LWPNACQDBZRYXW3VHJVCJ64QBZNGHOHHHZWCLNQ");
47 SECTION(
"size less than 1 block") {
51 "EOIEKIQO6BSNCNRX2UB2MB466INV6LICZ6MPUWQ");
55 "GOTZVYW3WIE37XFCDOY66PLLXWGP6DPN3CQRHWA");
57 SECTION(
"3 full and 1 partial block") {
58 TigerTree tt(data, 3 * BLOCK_SIZE + 500, dummyName);
61 "K6NHCUINLFZ7OUMUZ44JSRABL5C62WTCY2BONUI");
66 "WGRG4PY3CZDLYLTC6BZ2X3G22H6DEB77JH4XPBA");
68 ranges::fill(subspan<100>(buffer, 2 * BLOCK_SIZE - 50), 1);
71 "YV4NHQASK3QCYJH7FCOO4K3ABNC3WFVDDZ6FYAY");
74 SECTION(
"7 full blocks (unbalanced internal binary tree)") {
75 TigerTree tt(data, 7 * BLOCK_SIZE, dummyName);
78 "FPSZ35773WS4WGBVXM255KWNETQZXMTEJGFMLTA");
83 "NBCRBTHDNUDTAKZRMYO6TIQGQJIWX74BYNTYXBA");
85 ranges::fill(subspan<4 * BLOCK_SIZE>(buffer, 3 * BLOCK_SIZE), 1);
86 tt.
notifyChange(3 * BLOCK_SIZE, 4 * BLOCK_SIZE, dummyTime);
88 "PLHCYOTPV4TTXTUPHYGGVPMARGMFE4U5JYRV4VA");