Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
markbenvenuto committed Jul 19, 2024
1 parent afdb3df commit 9bb3933
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions test/test-mc-range-encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,42 @@ static void _test_RangeTest_Encode_Double(_mongocrypt_tester_t *tester) {
.precision = OPT_U32_C(0),
.expect = 1,
.expectMax = OPT_U64_C(36028797018963967)},
{.value = 0,
.max = OPT_DOUBLE_C(DOUBLE_MAX_SAFE_INT),
.min = OPT_DOUBLE_C(DOUBLE_MIN_SAFE_INT),
.precision = OPT_U32_C(0),
.expect = 9007199254740992,
.expectMax = OPT_U64_C(36028797018963967)},
{.value = 1,
.max = OPT_DOUBLE_C(DOUBLE_MAX_SAFE_INT),
.min = OPT_DOUBLE_C(DOUBLE_MIN_SAFE_INT),
.precision = OPT_U32_C(0),
.expect = 9007199254740993,
.expectMax = OPT_U64_C(36028797018963967)},
{.value = 2,
.max = OPT_DOUBLE_C(DOUBLE_MAX_SAFE_INT),
.min = OPT_DOUBLE_C(DOUBLE_MIN_SAFE_INT),
.precision = OPT_U32_C(0),
.expect = 9007199254740994,
.expectMax = OPT_U64_C(36028797018963967)},
{.value = 3,
.max = OPT_DOUBLE_C(DOUBLE_MAX_SAFE_INT),
.min = OPT_DOUBLE_C(DOUBLE_MIN_SAFE_INT),
.precision = OPT_U32_C(0),
.expect = 9007199254740995,
.expectMax = OPT_U64_C(36028797018963967)},
{.value = 4,
.max = OPT_DOUBLE_C(DOUBLE_MAX_SAFE_INT),
.min = OPT_DOUBLE_C(DOUBLE_MIN_SAFE_INT),
.precision = OPT_U32_C(0),
.expect = 9007199254740996,
.expectMax = OPT_U64_C(36028797018963967)},
{.value = 5,
.max = OPT_DOUBLE_C(DOUBLE_MAX_SAFE_INT),
.min = OPT_DOUBLE_C(DOUBLE_MIN_SAFE_INT),
.precision = OPT_U32_C(0),
.expect = 9007199254740997,
.expectMax = OPT_U64_C(36028797018963967)},
{.value = DOUBLE_MAX_SAFE_INT,
.max = OPT_DOUBLE_C(DOUBLE_MAX_SAFE_INT),
.min = OPT_DOUBLE_C(DOUBLE_MIN_SAFE_INT),
Expand Down

0 comments on commit 9bb3933

Please sign in to comment.