]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.h
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / replay / scripts / tests / expected / generate-enum-encoding-helpers.json-TestReplayInputs.h
index 824bb93534b442a740dc0eef099ab33259dfdf69..d38cee72e0a647e6ef6e39241c057ce25ccdfd46 100644 (file)
 
 #if ENABLE(WEB_REPLAY)
 #include "InternalNamespaceHeaderIncludeDummy.h"
+#include "PlatformEvent.h"
 #include <platform/ExternalNamespaceHeaderIncludeDummy.h>
 
-namespace WebCore {
+namespace Test {
 enum MouseButton : unsigned;
-}
-
-namespace JSC {
 enum class InputQueue;
 }
 
@@ -48,32 +46,39 @@ class SavedMouseButton;
 } // namespace Test
 
 namespace JSC {
-template<> struct InputTraits<Test::SavedMouseButton> {
+template<> struct TEST_EXPORT_MACRO InputTraits<Test::SavedMouseButton> {
     static InputQueue queue() { return InputQueue::ScriptMemoizedData; }
-    static const AtomicString& type();
+    static const String& type();
 
     static void encode(JSC::EncodedValue&, const Test::SavedMouseButton&);
     static bool decode(JSC::EncodedValue&, std::unique_ptr<Test::SavedMouseButton>&);
 };
-template<> struct EncodingTraits<InputQueue> {
-    typedef InputQueue DecodedType;
+template<> struct TEST_EXPORT_MACRO EncodingTraits<Test::InputQueue> {
+    typedef Test::InputQueue DecodedType;
 
-    static EncodedValue encodeValue(const InputQueue& value);
-    static bool decodeValue(EncodedValue&, InputQueue& value);
+    static EncodedValue encodeValue(const Test::InputQueue& value);
+    static bool decodeValue(EncodedValue&, Test::InputQueue& value);
 };
 
-template<> struct EncodingTraits<WebCore::MouseButton> {
-    typedef WebCore::MouseButton DecodedType;
+template<> struct TEST_EXPORT_MACRO EncodingTraits<Test::MouseButton> {
+    typedef Test::MouseButton DecodedType;
 
-    static EncodedValue encodeValue(const WebCore::MouseButton& value);
-    static bool decodeValue(EncodedValue&, WebCore::MouseButton& value);
+    static EncodedValue encodeValue(const Test::MouseButton& value);
+    static bool decodeValue(EncodedValue&, Test::MouseButton& value);
+};
+
+template<> struct TEST_EXPORT_MACRO EncodingTraits<Test::PlatformEvent::Type> {
+    typedef Test::PlatformEvent::Type DecodedType;
+
+    static EncodedValue encodeValue(const Test::PlatformEvent::Type& value);
+    static bool decodeValue(EncodedValue&, Test::PlatformEvent::Type& value);
 };
 } // namespace JSC
 
 namespace Test {
 class SavedMouseButton : public NondeterministicInput<SavedMouseButton> {
 public:
-    SavedMouseButton(MouseButton button);
+    TEST_EXPORT_MACRO SavedMouseButton(MouseButton button);
     virtual ~SavedMouseButton();
 
     MouseButton button() const { return m_button; }
@@ -82,6 +87,10 @@ private:
 };
 } // namespace Test
 
+SPECIALIZE_TYPE_TRAITS_BEGIN(Test::SavedMouseButton)
+    static bool isType(const NondeterministicInputBase& input) { return input.type() == InputTraits<Test::SavedMouseButton>::type(); }
+SPECIALIZE_TYPE_TRAITS_END()
+
 #define TEST_REPLAY_INPUT_NAMES_FOR_EACH(macro) \
     macro(SavedMouseButton) \
     \