#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <utility>
#include "mojo/public/cpp/bindings/lib/message_fragment.h"
#include "mojo/public/cpp/system/message_pipe.h"
#include "mojo/public/interfaces/bindings/tests/test_export2.mojom.h"
#include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
namespace test {
namespace {
RectPtr MakeRect(int32_t factor = 1) { … }
void CheckRect(const Rect& rect, int32_t factor = 1) { … }
template <typename StructType>
struct SerializeStructHelperTraits { … };
template <>
struct SerializeStructHelperTraits<native::NativeStruct> {
using DataView = native::NativeStructDataView;
};
template <typename InputType, typename DataType>
size_t SerializeStruct(InputType& input,
mojo::Message* message,
DataType** out_data) { … }
MultiVersionStructPtr MakeMultiVersionStruct() { … }
template <typename U, typename T>
U SerializeAndDeserialize(T input) { … }
StructTest;
}
TEST_F(StructTest, Rect) { … }
TEST_F(StructTest, Clone) { … }
TEST_F(StructTest, Serialization_Basic) { … }
TEST_F(StructTest, Construction_StructPointers) { … }
TEST_F(StructTest, Serialization_StructPointers) { … }
TEST_F(StructTest, Serialization_ArrayPointers) { … }
TEST_F(StructTest, Serialization_NullArrayPointers) { … }
TEST_F(StructTest, Versioning_OldToNew) { … }
TEST_F(StructTest, Versioning_NewToOld) { … }
TEST_F(StructTest, Serialization_NativeStruct) { … }
TEST_F(StructTest, Serialization_PublicAPI) { … }
TEST_F(StructTest, VersionedStructConstructor) { … }
TEST_F(StructTest, EnumNestedStructTest) { … }
TEST_F(StructTest, Matcher) { … }
}
}