+ ok1(!memoverlaps(haystack1, sizeof(haystack1),
+ haystack2, sizeof(haystack2)));
+ ok1(!memoverlaps(haystack2, sizeof(haystack2),
+ haystack1, sizeof(haystack1)));
+ ok1(memoverlaps(haystack1, sizeof(haystack1), haystack1, 1));
+ ok1(memoverlaps(haystack1, 1, haystack1, sizeof(haystack1)));
+ ok1(memoverlaps(haystack1, sizeof(haystack1),
+ haystack1 + sizeof(haystack1) - 1, 1));
+ ok1(memoverlaps(haystack1 + sizeof(haystack1) - 1, 1,
+ haystack1, sizeof(haystack1)));
+ ok1(!memoverlaps(haystack1, sizeof(haystack1),
+ haystack1 + sizeof(haystack1), 1));
+ ok1(!memoverlaps(haystack1 + sizeof(haystack1), 1,
+ haystack1, sizeof(haystack1)));
+ ok1(!memoverlaps(haystack1, sizeof(haystack1), haystack1 - 1, 1));
+ ok1(!memoverlaps(haystack1 - 1, 1, haystack1, sizeof(haystack1)));
+ ok1(memoverlaps(haystack1, 5, haystack1 + 4, 7));
+ ok1(!memoverlaps(haystack1, 5, haystack1 + 5, 6));
+ ok1(memoverlaps(haystack1 + 4, 7, haystack1, 5));
+ ok1(!memoverlaps(haystack1 + 5, 6, haystack1, 5));
+