diff --git a/shell/platform/linux/testing/fl_test.cc b/shell/platform/linux/testing/fl_test.cc index dc75794d6f9b3..3af19052fc09c 100644 --- a/shell/platform/linux/testing/fl_test.cc +++ b/shell/platform/linux/testing/fl_test.cc @@ -62,3 +62,8 @@ FlEngine* make_mock_engine_with_project(FlDartProject* project) { return static_cast(g_object_ref(engine)); } + +void PrintTo(FlValue* v, std::ostream* os) { + g_autofree gchar* s = fl_value_to_string(v); + *os << s; +} diff --git a/shell/platform/linux/testing/fl_test.h b/shell/platform/linux/testing/fl_test.h index bf954033b20da..9fcb3ac679af2 100644 --- a/shell/platform/linux/testing/fl_test.h +++ b/shell/platform/linux/testing/fl_test.h @@ -6,9 +6,11 @@ #define FLUTTER_SHELL_PLATFORM_LINUX_FL_TEST_H_ #include "flutter/shell/platform/linux/public/flutter_linux/fl_engine.h" +#include "flutter/shell/platform/linux/public/flutter_linux/fl_value.h" #include #include +#include G_BEGIN_DECLS @@ -27,6 +29,9 @@ FlEngine* make_mock_engine(); // platform messages. FlEngine* make_mock_engine_with_project(FlDartProject* project); +// GTest printer for FlValue. +void PrintTo(FlValue* v, std::ostream* os); + G_END_DECLS #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_TEST_H_