portable_types.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/endianness.hpp"
16 
17 /*****************************************************************************
18 ** Tests
19 *****************************************************************************/
20 /*
21  * Just make sure these are all defined. It will fail with an #error at
22  * compile time if they aren't.
23  */
24 TEST(TypeTests,fundamentals) {
25  ecl::int8 i8 = 1; i8 = 2;
26  ecl::uint8 ui8 = 1; ui8 = 2;
27  ecl::int8 i16 = 1; i16 = 2;
28  ecl::uint8 ui16 = 1; ui16 = 2;
29  ecl::int8 i32 = 1; i32 = 2;
30  ecl::uint8 ui32 = 1; ui32 = 2;
31  ecl::int8 i64 = 1; i64 = 1;
32  ecl::uint8 ui64 = 1; ui64 = 2;
33  ecl::float32 f32 = 1.0; f32 = 2.0;
34  ecl::float64 f64 = 1.0; f64 = 2.0;
35  #if ECL_SIZE_OF_LONG_DOUBLE == 12
36  ecl::float96 f96 = 1.0; f96 = 2.0;
37  #elif ECL_SIZE_OF_LONG_DOUBLE == 16
38  ecl::float128 f128 = 1.0; f128 = 2.0;
39  #endif
40  SUCCEED();
41 }
42 
43 /*****************************************************************************
44 ** Main
45 *****************************************************************************/
46 
47 int main(int argc, char **argv) {
48  testing::InitGoogleTest(&argc,argv);
49  return RUN_ALL_TESTS();
50 }
51 
52 
TEST(TypeTests, fundamentals)
int main(int argc, char **argv)


ecl_config
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:09:02