unittest_embed_optimize_for.proto 984 B

1234567891011121314151617181920212223242526272829
  1. // Protocol Buffers - Google's data interchange format
  2. // Copyright 2008 Google Inc. All rights reserved.
  3. //
  4. // Use of this source code is governed by a BSD-style
  5. // license that can be found in the LICENSE file or at
  6. // https://developers.google.com/open-source/licenses/bsd
  7. // Author: kenton@google.com (Kenton Varda)
  8. // Based on original Protocol Buffers design by
  9. // Sanjay Ghemawat, Jeff Dean, and others.
  10. //
  11. // A proto file which imports a proto file that uses optimize_for = CODE_SIZE.
  12. syntax = "proto2";
  13. package protobuf_unittest;
  14. import "google/protobuf/unittest_optimize_for.proto";
  15. // We optimize for speed here, but we are importing a proto that is optimized
  16. // for code size.
  17. option optimize_for = SPEED;
  18. message TestEmbedOptimizedForSize {
  19. // Test that embedding a message which has optimize_for = CODE_SIZE into
  20. // one optimized for speed works.
  21. optional TestOptimizedForSize optional_message = 1;
  22. repeated TestOptimizedForSize repeated_message = 2;
  23. }