wire_format_unittest for optimize_for = CODE_SIZE

PiperOrigin-RevId: 549424773
pull/13358/head
Protobuf Team Bot 1 year ago committed by Copybara-Service
parent 4b78e0f152
commit eba2093517
  1. 5
      src/google/protobuf/wire_format_unittest.inc

@ -38,6 +38,7 @@
#include <string>
#include <vector>
#include "google/protobuf/descriptor.pb.h"
#include <gmock/gmock.h>
#include "google/protobuf/testing/googletest.h"
#include <gtest/gtest.h>
@ -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.

Loading…
Cancel
Save