Lines Matching defs:ctx
51 struct quota_transaction_context ctx;
59 i_zero(&ctx);
60 ctx.count_used = tests[i].transaction_diff;
62 ctx.count_over = tests[i].initial_size - tests[i].limit;
64 ctx.count_ceil = tests[i].limit - tests[i].initial_size;
65 i_assert(ctx.count_used < 0 ||
66 (uint64_t)ctx.count_used <= ctx.count_ceil); /* test is broken otherwise */
68 test_assert_idx(quota_transaction_is_over(&ctx, 0) == tests[i].is_over, i);
74 i_zero(&ctx);
75 ctx.count_ceil = 1;
76 ctx.bytes_used = tests[i].transaction_diff;
78 ctx.bytes_over = tests[i].initial_size - tests[i].limit;
80 ctx.bytes_ceil = tests[i].limit - tests[i].initial_size;
81 i_assert(ctx.bytes_used < 0 ||
82 (uint64_t)ctx.bytes_used <= ctx.bytes_ceil); /* test is broken otherwise */
84 test_assert_idx(quota_transaction_is_over(&ctx, tests[i].new_size) == tests[i].is_over, i);