• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
8edition = "2023";
9
10package protobuf_unittest;
11
12option java_multiple_files = true;
13option java_package = "";
14
15// Each batch of extension ranges not separated by a non-extension field should
16// be serialized using a single ExtensionWriter#writeUntil call.
17message TestMessageWithManyExtensionRanges {
18  // First extension range: ends at field number 3 (exclusive)
19  extensions 1 to 2 [verification = UNVERIFIED];
20
21  int32 foo = 3;
22  int32 bar = 5;
23
24  // Second extension range: ends at field number 13 (exclusive)
25  extensions 6 [verification = UNVERIFIED];
26  extensions 8 [verification = UNVERIFIED];
27  extensions 10 to 12 [verification = UNVERIFIED];
28
29  int32 baz = 23;
30
31  // Third extension range: ends at field number 43 (exclusive)
32  extensions 42 [verification = UNVERIFIED];
33}
34