WIP
This commit is contained in:
parent
fa0fd4b552
commit
5521451bf3
|
@ -16,7 +16,7 @@
|
||||||
#define VALIDATE
|
#define VALIDATE
|
||||||
// define SNAPSHOTS
|
// define SNAPSHOTS
|
||||||
// define TODO_RESTORE_SNAPSHOTS
|
// define TODO_RESTORE_SNAPSHOTS
|
||||||
//define STABLE_SEED
|
// define STABLE_SEED
|
||||||
#define DOT
|
#define DOT
|
||||||
|
|
||||||
#ifdef DOT
|
#ifdef DOT
|
||||||
|
@ -315,8 +315,10 @@ main()
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
/* Set the PRNG state to a known constant for reproducible generation, easing debugging. */
|
/* Set the PRNG state to a known constant for reproducible generation, easing debugging. */
|
||||||
|
#ifdef STABLE_SEED
|
||||||
list->slh_prng_state = 12;
|
list->slh_prng_state = 12;
|
||||||
|
#endif
|
||||||
#ifdef SNAPSHOTS
|
#ifdef SNAPSHOTS
|
||||||
api_skip_snapshots_init_ex(list);
|
api_skip_snapshots_init_ex(list);
|
||||||
#endif
|
#endif
|
||||||
|
@ -378,12 +380,12 @@ main()
|
||||||
#endif
|
#endif
|
||||||
CHECK;
|
CHECK;
|
||||||
|
|
||||||
for (size_t j = 0; j < api_skip_length_ex(list); j++) {
|
for (size_t j = 0, k = api_skip_length_ex(list); j < k; j++) {
|
||||||
int n = xorshift32() % api_skip_length_ex(list);
|
int n = xorshift32() % api_skip_length_ex(list);
|
||||||
api_skip_contains_ex(list, n);
|
api_skip_contains_ex(list, array[n]);
|
||||||
CHECK;
|
CHECK;
|
||||||
}
|
}
|
||||||
#ifdef DOT
|
#if 0
|
||||||
sprintf(msg, "locate all the keys!!!");
|
sprintf(msg, "locate all the keys!!!");
|
||||||
api_skip_dot_ex(of, list, gen++, msg, sprintf_ex_node);
|
api_skip_dot_ex(of, list, gen++, msg, sprintf_ex_node);
|
||||||
#endif
|
#endif
|
||||||
|
@ -491,6 +493,18 @@ main()
|
||||||
api_skip_release_snapshots_ex(list);
|
api_skip_release_snapshots_ex(list);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
for (size_t i = 0; i < 1000000; i++) {
|
||||||
|
for (size_t j = 0, k = api_skip_length_ex(list); j < k; j++) {
|
||||||
|
int n = xorshift32() % api_skip_length_ex(list);
|
||||||
|
api_skip_contains_ex(list, array[n]);
|
||||||
|
CHECK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#ifdef DOT
|
||||||
|
sprintf(msg, "lots-o-contains later...");
|
||||||
|
api_skip_dot_ex(of, list, gen++, msg, sprintf_ex_node);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DOT
|
#ifdef DOT
|
||||||
api_skip_dot_end_ex(of, gen);
|
api_skip_dot_end_ex(of, gen);
|
||||||
fclose(of);
|
fclose(of);
|
||||||
|
|
Loading…
Reference in a new issue