Commit 9adb3aed authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Apply segmented test to 64-bit extremes

parent ee443ce5
......@@ -368,6 +368,7 @@ void test_integer(redis_parser_t *p) {
assert(redis_parser_execute(p, &res, buf, strlen(buf)) == strlen(buf));
assert(res != NULL);
assert(cb_log_idx == 1 && cb_log[0].integer_value == INT64_MAX);
test_char_by_char(res, buf, strlen(buf));
/* Signed 64-bit maximum overflow */
buf = ":9223372036854775808\r\n";
......@@ -382,6 +383,7 @@ void test_integer(redis_parser_t *p) {
assert(redis_parser_execute(p, &res, buf, strlen(buf)) == strlen(buf));
assert(res != NULL);
assert(cb_log_idx == 1 && cb_log[0].integer_value == INT64_MIN);
test_char_by_char(res, buf, strlen(buf));
/* Signed 64-bit minimum overflow (or underflow...) */
buf = ":-9223372036854775809\r\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment