mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-29 12:13:52 +00:00
parent
76d2cde656
commit
734af661c6
@ -1,5 +1,6 @@
|
||||
#include "app_helper.hpp"
|
||||
|
||||
#include <climits>
|
||||
#include <complex>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
@ -553,8 +554,8 @@ TEST(Types, TypeName) {
|
||||
}
|
||||
|
||||
TEST(Types, OverflowSmall) {
|
||||
char x;
|
||||
auto strmax = std::to_string(INT8_MAX + 1);
|
||||
signed char x;
|
||||
auto strmax = std::to_string(SCHAR_MAX + 1);
|
||||
EXPECT_FALSE(CLI::detail::lexical_cast(strmax, x));
|
||||
|
||||
unsigned char y;
|
||||
@ -641,7 +642,7 @@ TEST(Types, LexicalCastParsable) {
|
||||
}
|
||||
|
||||
TEST(Types, LexicalCastEnum) {
|
||||
enum t1 : char { v1 = 5, v3 = 7, v5 = -9 };
|
||||
enum t1 : signed char { v1 = 5, v3 = 7, v5 = -9 };
|
||||
|
||||
t1 output;
|
||||
EXPECT_TRUE(CLI::detail::lexical_cast("-9", output));
|
||||
|
Loading…
x
Reference in New Issue
Block a user