File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
include/hazelcast/client/serialization/pimpl Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ class HAZELCAST_API data_output
138
138
typename std::enable_if<std::is_same<std::vector<byte>, T>::value ||
139
139
std::is_same<std::vector<char >, T>::value ||
140
140
std::is_same<std::vector<bool >, T>::value ||
141
+ std::is_same<std::vector<int8_t >, T>::value ||
141
142
std::is_same<std::vector<int16_t >, T>::value ||
142
143
std::is_same<std::vector<int32_t >, T>::value ||
143
144
std::is_same<std::vector<int64_t >, T>::value ||
@@ -349,6 +350,7 @@ template<typename T>
349
350
typename std::enable_if<std::is_same<std::vector<byte>, T>::value ||
350
351
std::is_same<std::vector<char >, T>::value ||
351
352
std::is_same<std::vector<bool >, T>::value ||
353
+ std::is_same<std::vector<int8_t >, T>::value ||
352
354
std::is_same<std::vector<int16_t >, T>::value ||
353
355
std::is_same<std::vector<int32_t >, T>::value ||
354
356
std::is_same<std::vector<int64_t >, T>::value ||
Original file line number Diff line number Diff line change @@ -3675,6 +3675,24 @@ TEST_F(DataOutputTest, testWriteChar_16_LittleEndian)
3675
3675
ASSERT_EQ (std::vector<byte>({ 0xAC , 0x20 }), dataOutput.to_byte_array ());
3676
3676
}
3677
3677
3678
+ TEST_F (DataOutputTest, testWriteInt8)
3679
+ {
3680
+ std::vector<byte> bytes{ 0x34 , 0x12 };
3681
+ serialization::pimpl::data_output dataOutput (boost::endian::order::big);
3682
+ dataOutput.write <int8_t >(0x34 );
3683
+ dataOutput.write <int8_t >(0x12 );
3684
+ ASSERT_EQ (bytes, dataOutput.to_byte_array ());
3685
+ }
3686
+
3687
+ TEST_F (DataOutputTest, testWriteInt8_LittleEndian)
3688
+ {
3689
+ std::vector<byte> bytes{ 0x1A , 0x5F };
3690
+ serialization::pimpl::data_output dataOutput (boost::endian::order::little);
3691
+ dataOutput.write <int8_t >(0x1A );
3692
+ dataOutput.write <int8_t >(0x5F );
3693
+ ASSERT_EQ (bytes, dataOutput.to_byte_array ());
3694
+ }
3695
+
3678
3696
TEST_F (DataOutputTest, testWriteShort)
3679
3697
{
3680
3698
std::vector<byte> bytes{ 0x12 , 0x34 };
You can’t perform that action at this time.
0 commit comments