Commit 734af661c6bda054609fdd4959eb1ee50858817b

Authored by ryan4729
Committed by Henry Schreiner
1 parent 76d2cde6

fix tests on aarch64 (#266)

* fix tests on aarch64
Showing 1 changed file with 4 additions and 3 deletions
tests/HelpersTest.cpp
1 1 #include "app_helper.hpp"
2 2  
  3 +#include <climits>
3 4 #include <complex>
4 5 #include <cstdint>
5 6 #include <cstdio>
... ... @@ -553,8 +554,8 @@ TEST(Types, TypeName) {
553 554 }
554 555  
555 556 TEST(Types, OverflowSmall) {
556   - char x;
557   - auto strmax = std::to_string(INT8_MAX + 1);
  557 + signed char x;
  558 + auto strmax = std::to_string(SCHAR_MAX + 1);
558 559 EXPECT_FALSE(CLI::detail::lexical_cast(strmax, x));
559 560  
560 561 unsigned char y;
... ... @@ -641,7 +642,7 @@ TEST(Types, LexicalCastParsable) {
641 642 }
642 643  
643 644 TEST(Types, LexicalCastEnum) {
644   - enum t1 : char { v1 = 5, v3 = 7, v5 = -9 };
  645 + enum t1 : signed char { v1 = 5, v3 = 7, v5 = -9 };
645 646  
646 647 t1 output;
647 648 EXPECT_TRUE(CLI::detail::lexical_cast("-9", output));
... ...