diff options
Diffstat (limited to 'contrib/llvm-project/compiler-rt/lib/orc/tests/unit/simple_packed_serialization_test.cpp')
-rw-r--r-- | contrib/llvm-project/compiler-rt/lib/orc/tests/unit/simple_packed_serialization_test.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/contrib/llvm-project/compiler-rt/lib/orc/tests/unit/simple_packed_serialization_test.cpp b/contrib/llvm-project/compiler-rt/lib/orc/tests/unit/simple_packed_serialization_test.cpp index e7a78062b210..397114b4017e 100644 --- a/contrib/llvm-project/compiler-rt/lib/orc/tests/unit/simple_packed_serialization_test.cpp +++ b/contrib/llvm-project/compiler-rt/lib/orc/tests/unit/simple_packed_serialization_test.cpp @@ -11,6 +11,7 @@ //===----------------------------------------------------------------------===// #include "simple_packed_serialization.h" +#include "simple_packed_serialization_utils.h" #include "gtest/gtest.h" using namespace __orc_rt; @@ -48,25 +49,6 @@ TEST(SimplePackedSerializationTest, SPSInputBuffer) { EXPECT_FALSE(IB.read(&C, 1)); } -template <typename SPSTagT, typename T> -static void blobSerializationRoundTrip(const T &Value) { - using BST = SPSSerializationTraits<SPSTagT, T>; - - size_t Size = BST::size(Value); - auto Buffer = std::make_unique<char[]>(Size); - SPSOutputBuffer OB(Buffer.get(), Size); - - EXPECT_TRUE(BST::serialize(OB, Value)); - - SPSInputBuffer IB(Buffer.get(), Size); - - T DSValue; - EXPECT_TRUE(BST::deserialize(IB, DSValue)); - - EXPECT_EQ(Value, DSValue) - << "Incorrect value after serialization/deserialization round-trip"; -} - template <typename T> static void testFixedIntegralTypeSerialization() { blobSerializationRoundTrip<T, T>(0); blobSerializationRoundTrip<T, T>(static_cast<T>(1)); |