mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 18:54:13 +08:00
mdbx-test: add min/max cases for option values.
Change-Id: Ie77b828376a75aad09ea4dab202178b1f09bc6ad
This commit is contained in:
parent
b41bef8307
commit
e7d4d24265
@ -133,6 +133,16 @@ bool parse_option(int argc, char *const argv[], int &narg, const char *option,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strcmp(value_cstr, "min") == 0 || strcmp(value_cstr, "minimal") == 0) {
|
||||||
|
value = minval;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strcmp(value_cstr, "max") == 0 || strcmp(value_cstr, "maximal") == 0) {
|
||||||
|
value = maxval;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
char *suffix = nullptr;
|
char *suffix = nullptr;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
unsigned long long raw = strtoull(value_cstr, &suffix, 0);
|
unsigned long long raw = strtoull(value_cstr, &suffix, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user