diff --git a/src/google/protobuf/wire_format_unittest.inc b/src/google/protobuf/wire_format_unittest.inc index 3588984647..f994b31338 100644 --- a/src/google/protobuf/wire_format_unittest.inc +++ b/src/google/protobuf/wire_format_unittest.inc @@ -38,6 +38,7 @@ #include #include +#include "google/protobuf/descriptor.pb.h" #include #include "google/protobuf/testing/googletest.h" #include @@ -64,6 +65,10 @@ namespace protobuf { namespace internal { namespace { +inline bool IsOptimizeForCodeSize(const Descriptor* descriptor) { + return descriptor->file()->options().optimize_for() == FileOptions::CODE_SIZE; +} + TEST(WireFormatTest, EnumsInSync) { // Verify that WireFormatLite::FieldType and WireFormatLite::CppType match // FieldDescriptor::Type and FieldDescriptor::CppType.