22 #if defined(_WIN32) && !defined(USING_UV_SHARED)
27 #include "../src/win/fs-fd-hash-inl.h"
30 #define HASH_MAX 1000000000
31 #define HASH_INC (1000 * UV__FD_HASH_SIZE + 2)
32 #define BUCKET_MAX (UV__FD_HASH_SIZE * UV__FD_HASH_GROUP_SIZE * 10)
33 #define BUCKET_INC UV__FD_HASH_SIZE
37 void assert_nonexistent(
int fd) {
43 void assert_existent(
int fd) {
49 void assert_insertion(
int fd) {
51 assert_nonexistent(fd);
52 info.
flags = fd + FD_DIFF;
57 void assert_removal(
int fd) {
62 assert_nonexistent(fd);
67 #define RUN_HASH(function) \
69 for (fd = 0; fd < HASH_MAX; fd += HASH_INC) { \
75 #define RUN_COLLISIONS(function) \
77 for (fd = 1; fd < BUCKET_MAX; fd += BUCKET_INC) { \
89 RUN_HASH(assert_nonexistent);
90 RUN_COLLISIONS(assert_nonexistent);
93 RUN_HASH(assert_insertion);
94 RUN_COLLISIONS(assert_insertion);
97 RUN_HASH(assert_existent);
98 RUN_COLLISIONS(assert_existent);
103 info.
flags = FD_DIFF + FD_DIFF;
114 info.
flags = FD_DIFF;
119 RUN_HASH(assert_removal);
120 RUN_COLLISIONS(assert_removal);
123 RUN_HASH(assert_nonexistent);
124 RUN_COLLISIONS(assert_nonexistent);