From 53bf886a97095b523e44eab3fc75fe96dfc4a9f4 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 10 Jul 2018 17:02:03 -0600 Subject: [PATCH] t/axmap: add a few more overlap test cases Signed-off-by: Jens Axboe --- t/axmap.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/t/axmap.c b/t/axmap.c index 4e6f22a8..2afe876c 100644 --- a/t/axmap.c +++ b/t/axmap.c @@ -117,6 +117,30 @@ static int test_overlap(void) map = axmap_new(200); + ret = axmap_set_nr(map, 16, 16); + if (ret != 16) { + printf("fail 0 16: %d\n", ret); + return 1; + } + + ret = axmap_set_nr(map, 0, 32); + if (ret != 16) { + printf("fail 0 32: %d\n", ret); + return 1; + } + + ret = axmap_set_nr(map, 48, 32); + if (ret != 32) { + printf("fail 48 32: %d\n", ret); + return 1; + } + + ret = axmap_set_nr(map, 32, 32); + if (ret != 16) { + printf("fail 32 32: %d\n", ret); + return 1; + } + ret = axmap_set_nr(map, 102, 1); if (ret != 1) { printf("fail 102 1: %d\n", ret); -- 2.25.1