summaryrefslogtreecommitdiff
path: root/src/test/test_rendcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test_rendcache.c')
-rw-r--r--src/test/test_rendcache.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/test/test_rendcache.c b/src/test/test_rendcache.c
index 17d86bc39e..a5d3f351f8 100644
--- a/src/test/test_rendcache.c
+++ b/src/test/test_rendcache.c
@@ -647,7 +647,6 @@ test_rend_cache_init(void *data)
static void
test_rend_cache_decrement_allocation(void *data)
{
- int log_level = 0;
(void)data;
// Test when the cache has enough allocations
@@ -657,27 +656,24 @@ test_rend_cache_decrement_allocation(void *data)
// Test when there are not enough allocations
rend_cache_total_allocation = 1;
- log_level = setup_full_capture_of_logs(LOG_WARN);
+ setup_full_capture_of_logs(LOG_WARN);
rend_cache_decrement_allocation(2);
tt_int_op(rend_cache_total_allocation, OP_EQ, 0);
expect_single_log_msg_containing(
"Underflow in rend_cache_decrement_allocation");
- teardown_capture_of_logs(log_level);
- log_level = 0;
+ teardown_capture_of_logs();
// And again
rend_cache_decrement_allocation(2);
tt_int_op(rend_cache_total_allocation, OP_EQ, 0);
done:
- if (log_level)
- teardown_capture_of_logs(log_level);
+ teardown_capture_of_logs();
}
static void
test_rend_cache_increment_allocation(void *data)
{
- int log_level = 0;
(void)data;
// Test when the cache is not overflowing
@@ -687,21 +683,19 @@ test_rend_cache_increment_allocation(void *data)
// Test when there are too many allocations
rend_cache_total_allocation = SIZE_MAX-1;
- log_level = setup_full_capture_of_logs(LOG_WARN);
+ setup_full_capture_of_logs(LOG_WARN);
rend_cache_increment_allocation(2);
tt_u64_op(rend_cache_total_allocation, OP_EQ, SIZE_MAX);
expect_single_log_msg_containing(
"Overflow in rend_cache_increment_allocation");
- teardown_capture_of_logs(log_level);
- log_level = 0;
+ teardown_capture_of_logs();
// And again
rend_cache_increment_allocation(2);
tt_u64_op(rend_cache_total_allocation, OP_EQ, SIZE_MAX);
done:
- if (log_level)
- teardown_capture_of_logs(log_level);
+ teardown_capture_of_logs();
}
static void