From 91501bc2d1f144dc7e10d7d1ba716506891ef78c Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Wed, 30 Dec 2015 09:19:34 +0800 Subject: [PATCH] unit: modify the testcase #349 to reflect the recent change on the semantics of uc_mem_map() --- tests/unit/test_mem_map.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/unit/test_mem_map.c b/tests/unit/test_mem_map.c index 45f586fd..210d4790 100644 --- a/tests/unit/test_mem_map.c +++ b/tests/unit/test_mem_map.c @@ -129,16 +129,13 @@ static void test_bad_unmap(void **state) } -/* Try to unmap memory that has not been mapped twice*/ +/* Try to map overlapped memory range */ static void test_unmap_double_map(void **state) { uc_engine *uc = *state; - /* TODO: Which error should this return? */ - uc_assert_success(uc_mem_map(uc, 0, 0x4000, 0)); /* 0x0000 - 0x1000 */ - uc_assert_success(uc_mem_map(uc, 0x0000, 0x1000, 0)); /* 0x1000 - 0x2000 */ - - uc_assert_fail(uc_mem_unmap(uc, 0x2000, 0x2000)); + uc_assert_success(uc_mem_map(uc, 0, 0x4000, 0)); /* 0x0000 - 0x4000 */ + uc_assert_fail(uc_mem_map(uc, 0x0000, 0x1000, 0)); /* 0x1000 - 0x1000 */ } int main(void) {