nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

commit b21ddbd6510eab4b0bae6f81be0f3d7aa2225168
parent 03b4d711aa0e5533cd996c6de53771eb4e41ca6d
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 28 Dec 2023 14:00:36 -0800

test: ocd tweak

Diffstat:
Mtest.c | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/test.c b/test.c @@ -800,16 +800,18 @@ static void test_url_parsing() { int i = 0; while ((block = ndb_blocks_iterate_next(iter))) { str = ndb_block_str(block); - switch (i++) { - case 0: assert(!strncmp(str->str, DAMUSIO, str->len)); break; - case 1: assert(!strncmp(str->str, ", ", str->len)); break; - case 2: assert(!strncmp(str->str, JB55COM, str->len)); break; - case 3: assert(!strncmp(str->str, ", ", str->len)); break; - case 4: assert(!strncmp(str->str, WIKIORG, str->len)); break; + switch (++i) { + case 1: assert(!strncmp(str->str, DAMUSIO, str->len)); break; + case 2: assert(!strncmp(str->str, ", ", str->len)); break; + case 3: assert(!strncmp(str->str, JB55COM, str->len)); break; + case 4: assert(!strncmp(str->str, ", ", str->len)); break; + case 5: assert(!strncmp(str->str, WIKIORG, str->len)); break; } } assert(i == 5); + ndb_blocks_iterate_free(iter); + }