portable_types.cpp
Go to the documentation of this file.
00001 
00009 /*****************************************************************************
00010 ** Includes
00011 *****************************************************************************/
00012 
00013 #include <iostream>
00014 #include <gtest/gtest.h>
00015 #include "../../include/ecl/config/endianness.hpp"
00016 
00017 /*****************************************************************************
00018 ** Tests
00019 *****************************************************************************/
00020 /*
00021  * Just make sure these are all defined. It will fail with an #error at
00022  * compile time if they aren't.
00023  */
00024 TEST(TypeTests,fundamentals) {
00025         ecl::int8 i8 = 1; i8 = 2;
00026         ecl::uint8 ui8 = 1; ui8 = 2;
00027         ecl::int8 i16 = 1; i16 = 2;
00028         ecl::uint8 ui16 = 1; ui16 = 2;
00029         ecl::int8 i32 = 1; i32 = 2;
00030         ecl::uint8 ui32 = 1; ui32 = 2;
00031         ecl::int8 i64 = 1; i64 = 1;
00032         ecl::uint8 ui64 = 1; ui64 = 2;
00033         ecl::float32 f32 = 1.0; f32 = 2.0;
00034         ecl::float64 f64 = 1.0; f64 = 2.0;
00035         #if ECL_SIZE_OF_LONG_DOUBLE == 12
00036                 ecl::float96 f96 = 1.0; f96 = 2.0;
00037         #elif ECL_SIZE_OF_LONG_DOUBLE == 16
00038                 ecl::float128 f128 = 1.0; f128 = 2.0;
00039         #endif
00040     SUCCEED();
00041 }
00042 
00043 /*****************************************************************************
00044 ** Main
00045 *****************************************************************************/
00046 
00047 int main(int argc, char **argv) {
00048         testing::InitGoogleTest(&argc,argv);
00049     return RUN_ALL_TESTS();
00050 }
00051 
00052 


ecl_config
Author(s): Daniel Stonier
autogenerated on Wed Aug 26 2015 11:27:12