char_sign.cpp
Go to the documentation of this file.
1 
9 /*****************************************************************************
10 ** Includes
11 *****************************************************************************/
12 
13 #include <iostream>
14 #include <gtest/gtest.h>
15 #include "../../include/ecl/config/char_sign.hpp"
16 
17 /*****************************************************************************
18 ** Tests
19 *****************************************************************************/
20 /*
21  * Doesn't matter what the result is, just provide coverage.
22  * compile time if they aren't.
23  */
24 TEST(TypeTests,fundamentals) {
25  bool result = ecl::is_char_signed();
26  if ( result ) {
27  std::cout << "Char is signed." << std::endl;
28  } else {
29  std::cout << "Char is unsigned." << std::endl;
30  }
31  result = false; // stop gcc warnings.
32  SUCCEED();
33 }
34 
35 /*****************************************************************************
36 ** Main
37 *****************************************************************************/
38 
39 int main(int argc, char **argv) {
40  std::cout << "CHAR_MIN" << CHAR_MIN << std::endl;
41  testing::InitGoogleTest(&argc,argv);
42  return RUN_ALL_TESTS();
43 }
44 
45 
TEST
TEST(TypeTests, fundamentals)
Definition: char_sign.cpp:24
main
int main(int argc, char **argv)
Definition: char_sign.cpp:39
ecl::is_char_signed
bool is_char_signed()
Determines if your platform char type is signed or otherwise.
Definition: char_sign.hpp:41


ecl_config
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:13:53