Raw source file available here .
// Written by retoor@molodetz.nl
// This code generates random keys and stores them in a key-value store, then asserts that the retrieved value matches the expected value
// "tast".
// Includes: rkeytable.h, rtest.h, rstring.h
// MIT License
#include "rkeytable.h"
#include "rtest.h"
#include "rstring.h"
int main() {
for (int i = 0; i < 1000; i++) {
char *key = rgenerate_key();
rkset(key, "tast");
rasserts(!strcmp(rkget(key), "tast"));
}
return 0;
}