| 862 | } |
| 863 | |
| 864 | int |
| 865 | ACE_TMAIN(int, ACE_TCHAR*[]) |
| 866 | { |
| 867 | const char string[] = "This is a test of the string serialization."; |
| 868 | #ifdef DDS_HAS_WCHAR |
| 869 | const ACE_CDR::WChar wstring[] = L"This is a test of the wstring serialization."; |
| 870 | #endif |
| 871 | #ifndef OPENDDS_SAFETY_PROFILE |
| 872 | std::string stdstring = "This is a test of the std string serialization."; |
| 873 | #ifdef DDS_HAS_WCHAR |
| 874 | std::wstring stdwstring = L"This is a test of the std wstring serialization."; |
| 875 | #endif |
| 876 | #endif |
| 877 | |
| 878 | Values expected = { |
| 879 | 0x01, |
| 880 | #if OPENDDS_HAS_EXPLICIT_INTS |
| 881 | 0x11, |
| 882 | #endif |
| 883 | 0x2345, |
| 884 | 0x67abcdef, |
| 885 | ACE_INT64_LITERAL(0x0123456789abcdef), |
| 886 | #if OPENDDS_HAS_EXPLICIT_INTS |
| 887 | 0x22, |
| 888 | #endif |
| 889 | 0x0123, |
| 890 | 0x456789ab, |
| 891 | ACE_UINT64_LITERAL(0xcdef0123456789ab), |
| 892 | 0.1f, |
| 893 | 0.2, |
| 894 | #if ACE_SIZEOF_LONG_DOUBLE == 16 |
| 895 | 0x89abcdef01234567LL, |
| 896 | #else |
| 897 | {{0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77}}, |
| 898 | #endif |
| 899 | 0x1a, |
| 900 | 0xb2, |
| 901 | const_cast<ACE_CDR::Char*>(string) |
| 902 | #ifndef OPENDDS_SAFETY_PROFILE |
| 903 | , stdstring |
| 904 | #endif |
| 905 | #ifdef DDS_HAS_WCHAR |
| 906 | , const_cast<ACE_CDR::WChar*>(wstring) |
| 907 | #ifndef OPENDDS_SAFETY_PROFILE |
| 908 | , stdwstring |
| 909 | #endif |
| 910 | #endif |
| 911 | }; |
| 912 | |
| 913 | ArrayValues expectedArray; |
| 914 | |
| 915 | // Initialize the array |
| 916 | for (size_t i = 0; i < ARRAYSIZE; ++i) { |
| 917 | expectedArray.octetValue[i] = (0xff&i); |
| 918 | #if OPENDDS_HAS_EXPLICIT_INTS |
| 919 | expectedArray.int8Value[i] = static_cast<ACE_CDR::Int8>(0xdd & i); |
| 920 | #endif |
| 921 | expectedArray.shortValue[i] = (0xffff&i); |
nothing calls this directly
no test coverage detected