Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 67 additions & 6 deletions editions/golden/compare_cpp_codegen_failure.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.pb.cc
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.pb.cc (Go)
@@ @@
::_pbi::TcParser::GetTable<::protobuf_editions_test::golden::SimpleProto3>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
Expand Down Expand Up @@ -34,8 +34,65 @@
cached_has_bits = this_._impl_._has_bits_[0];
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
[ FAILED ] third_party/protobuf/editions/golden/simple_proto3.pb.cc
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.pb.h
[ FAILED ] third_party/protobuf/editions/golden/simple_proto3.pb.cc (Go)
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.pb.cc (Java)
@@ @@
::_pbi::TcParser::GetTable<::protobuf_editions_test::golden::SimpleProto3>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
- // optional int32 int32_field = 1;
+ // int32 int32_field = 1;
{::_pbi::TcParser::FastV32S1,
{8, 0, 0,
PROTOBUF_FIELD_OFFSET(SimpleProto3, _impl_.int32_field_)}},
}}, {{
65535, 65535
}}, {{
- // optional int32 int32_field = 1;
+ // int32 int32_field = 1;
{PROTOBUF_FIELD_OFFSET(SimpleProto3, _impl_.int32_field_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
}},
// no aux_entries
@@ @@
(void)cached_has_bits;

cached_has_bits = this_._impl_._has_bits_[0];
- // optional int32 int32_field = 1;
+ // int32 int32_field = 1;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
target =
::proto2::internal::WireFormatLite::WriteInt32ToArrayWithField<1>(
@@ @@
::uint32_t cached_has_bits [[maybe_unused]] = 0;

{
- // optional int32 int32_field = 1;
+ // int32 int32_field = 1;
cached_has_bits = this_._impl_._has_bits_[0];
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
[ FAILED ] third_party/protobuf/editions/golden/simple_proto3.pb.cc (Java)
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.pb.h (Go)
@@ @@
enum : int {
kInt32FieldFieldNumber = 1,
};
- // optional int32 int32_field = 1;
+ // int32 int32_field = 1;
[[nodiscard]] bool has_int32_field() const;
void clear_int32_field() ;
[[nodiscard]] ::int32_t int32_field() const;
@@ @@

// SimpleProto3

-// optional int32 int32_field = 1;
+// int32 int32_field = 1;
inline bool SimpleProto3::has_int32_field() const {
bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U);
return value;
[ FAILED ] third_party/protobuf/editions/golden/simple_proto3.pb.h (Go)
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.pb.h (Java)
@@ @@
enum : int {
kInt32FieldFieldNumber = 1,
Expand All @@ -54,6 +111,10 @@
inline bool SimpleProto3::has_int32_field() const {
bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U);
return value;
[ FAILED ] third_party/protobuf/editions/golden/simple_proto3.pb.h
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h
[ OK ] third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h
[ FAILED ] third_party/protobuf/editions/golden/simple_proto3.pb.h (Java)
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h (Go)
[ OK ] third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h (Go)
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h (Java)
[ OK ] third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h (Java)
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.proto (Go vs Java Equivalence)
[ OK ] third_party/protobuf/editions/golden/simple_proto3.proto (Go vs Java Equivalence)
18 changes: 14 additions & 4 deletions editions/golden/compare_cpp_codegen_failure.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="1" name="AllTests">
<testsuites tests="3" name="AllTests">
<testsuite name="EditionsCodegenTests">
<testcase name="third_party/protobuf/editions/golden/simple_proto3.pb.cc" status="run" result="completed" classname="DiffTest">
<testcase name="third_party/protobuf/editions/golden/simple_proto3.pb.cc (Go)" status="run" result="completed" classname="DiffTest">
<failure message="Value of: third_party/protobuf/editions/golden/simple_proto3.pb.cc&#x0A;Expected: &#x0A;// Generated by the protocol buffer compiler. DO NOT EDIT!&#x0A;// NO CHECKED-IN PROTOBUF GENCODE&#x0A;// source: third_party/protobuf/editions/golden/simple_proto3.proto&#x0A;&#x0A;#include &quot;third_party/protobuf/editions/golden/simple_proto3.pb.h&quot;&#x0A;&#x0A;#include &lt;algorithm&gt;&#x0A;#include &lt;type_traits&gt;&#x0A;#include &quot;third_party/protobuf/io/coded_stream.h&quot;&#x0A;#include &quot;third_party/protobuf/generated_message_tctable_impl.h&quot;&#x0A;#include &quot;third_party/protobuf/internal_visibility.h&quot;&#x0A;#include &quot;third_party/protobuf/extension_set.h&quot;&#x0A;#include &quot;third_party/protobuf/generated_message_util.h&quot;&#x0A;#include &quot;third_party/protobuf/wire_format_lite.h&quot;&#x0A;#include &quot;third_party/protobuf/io/zero_copy_stream_impl_lite.h&quot;&#x0A;// @@protoc_insertion_point(includes)&#x0A;&#x0A;// Must be included last.&#x0A;, with the difference:&#x0A;@@ @@&#x0A; ::_pbi::TcParser::GetTable&lt;::protobuf_editions_test::golden::SimpleProto3&gt;(), // to_prefetch&#x0A; #endif // PROTOBUF_PREFETCH_PARSE_TABLE&#x0A; }, {{&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; {::_pbi::TcParser::FastV32S1,&#x0A; {8, 0, 0,&#x0A; PROTOBUF_FIELD_OFFSET(SimpleProto3, _impl_.int32_field_)}},&#x0A; }}, {{&#x0A; 65535, 65535&#x0A; }}, {{&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; {PROTOBUF_FIELD_OFFSET(SimpleProto3, _impl_.int32_field_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},&#x0A; }},&#x0A; // no aux_entries&#x0A;@@ @@&#x0A; (void)cached_has_bits;&#x0A; &#x0A; cached_has_bits = this_._impl_._has_bits_[0];&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; if (CheckHasBit(cached_has_bits, 0x00000001U)) {&#x0A; target =&#x0A; ::proto2::internal::WireFormatLite::WriteInt32ToArrayWithField&lt;1&gt;(&#x0A;@@ @@&#x0A; ::uint32_t cached_has_bits [[maybe_unused]] = 0;&#x0A; &#x0A; {&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; cached_has_bits = this_._impl_._has_bits_[0];&#x0A; if (CheckHasBit(cached_has_bits, 0x00000001U)) {&#x0A; total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(" type=""></failure>
</testcase>
<testcase name="third_party/protobuf/editions/golden/simple_proto3.pb.h" status="run" result="completed" classname="DiffTest">
<testcase name="third_party/protobuf/editions/golden/simple_proto3.pb.cc (Java)" status="run" result="completed" classname="DiffTest">
<failure message="Value of: third_party/protobuf/editions/golden/simple_proto3.pb.cc&#x0A;Expected: &#x0A;// Generated by the protocol buffer compiler. DO NOT EDIT!&#x0A;// NO CHECKED-IN PROTOBUF GENCODE&#x0A;// source: third_party/protobuf/editions/golden/simple_proto3.proto&#x0A;&#x0A;#include &quot;third_party/protobuf/editions/golden/simple_proto3.pb.h&quot;&#x0A;&#x0A;#include &lt;algorithm&gt;&#x0A;#include &lt;type_traits&gt;&#x0A;#include &quot;third_party/protobuf/io/coded_stream.h&quot;&#x0A;#include &quot;third_party/protobuf/generated_message_tctable_impl.h&quot;&#x0A;#include &quot;third_party/protobuf/internal_visibility.h&quot;&#x0A;#include &quot;third_party/protobuf/extension_set.h&quot;&#x0A;#include &quot;third_party/protobuf/generated_message_util.h&quot;&#x0A;#include &quot;third_party/protobuf/wire_format_lite.h&quot;&#x0A;#include &quot;third_party/protobuf/io/zero_copy_stream_impl_lite.h&quot;&#x0A;// @@protoc_insertion_point(includes)&#x0A;&#x0A;// Must be included last.&#x0A;, with the difference:&#x0A;@@ @@&#x0A; ::_pbi::TcParser::GetTable&lt;::protobuf_editions_test::golden::SimpleProto3&gt;(), // to_prefetch&#x0A; #endif // PROTOBUF_PREFETCH_PARSE_TABLE&#x0A; }, {{&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; {::_pbi::TcParser::FastV32S1,&#x0A; {8, 0, 0,&#x0A; PROTOBUF_FIELD_OFFSET(SimpleProto3, _impl_.int32_field_)}},&#x0A; }}, {{&#x0A; 65535, 65535&#x0A; }}, {{&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; {PROTOBUF_FIELD_OFFSET(SimpleProto3, _impl_.int32_field_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},&#x0A; }},&#x0A; // no aux_entries&#x0A;@@ @@&#x0A; (void)cached_has_bits;&#x0A; &#x0A; cached_has_bits = this_._impl_._has_bits_[0];&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; if (CheckHasBit(cached_has_bits, 0x00000001U)) {&#x0A; target =&#x0A; ::proto2::internal::WireFormatLite::WriteInt32ToArrayWithField&lt;1&gt;(&#x0A;@@ @@&#x0A; ::uint32_t cached_has_bits [[maybe_unused]] = 0;&#x0A; &#x0A; {&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; cached_has_bits = this_._impl_._has_bits_[0];&#x0A; if (CheckHasBit(cached_has_bits, 0x00000001U)) {&#x0A; total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(" type=""></failure>
</testcase>
<testcase name="third_party/protobuf/editions/golden/simple_proto3.pb.h (Go)" status="run" result="completed" classname="DiffTest">
<failure message="Value of: third_party/protobuf/editions/golden/simple_proto3.pb.h&#x0A;Expected: &#x0A;// Generated by the protocol buffer compiler. DO NOT EDIT!&#x0A;// NO CHECKED-IN PROTOBUF GENCODE&#x0A;// source: third_party/protobuf/editions/golden/simple_proto3.proto&#x0A;&#x0A;#ifndef third_5fparty_2fprotobuf_2feditions_2fgolden_2fsimple_5fproto3_2eproto_2epb_2eh&#x0A;#define third_5fparty_2fprotobuf_2feditions_2fgolden_2fsimple_5fproto3_2eproto_2epb_2eh&#x0A;&#x0A;#include &lt;limits&gt;&#x0A;#include &lt;string&gt;&#x0A;#include &lt;type_traits&gt;&#x0A;#include &lt;utility&gt;&#x0A;&#x0A;// clang-format off&#x0A;#include &quot;third_party/protobuf/runtime_version.h&quot;&#x0A;#include &quot;third_party/protobuf/io/coded_stream.h&quot;&#x0A;#include &quot;third_party/protobuf/arena.h&quot;&#x0A;#include &quot;third_party/protobuf/arenastring.h&quot;&#x0A;#include &quot;third_party/protobuf/generated_message_tctable_decl.h&quot;&#x0A;#include &quot;third_party/protobuf/generated_message_util.h&quot;&#x0A;#include &quot;third_party/protobuf/metadata_lite.h&quot;&#x0A;#include &quot;third_party/protobuf/message_lite.h&quot;&#x0A;// @@protoc_insertion_point(includes)&#x0A;&#x0A;// Must be included last.&#x0A;// clang-format on&#x0A;&#x0A;#endif // third_5fparty_2fprotobuf_2feditions_2fgolden_2fsimple_5fproto3_2eproto_2epb_2eh&#x0A;, with the difference:&#x0A;@@ @@&#x0A; enum : int {&#x0A; kInt32FieldFieldNumber = 1,&#x0A; };&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; [[nodiscard]] bool has_int32_field() const;&#x0A; void clear_int32_field() ;&#x0A; [[nodiscard]] ::int32_t int32_field() const;&#x0A;@@ @@&#x0A; &#x0A; // SimpleProto3&#x0A; &#x0A;-// optional int32 int32_field = 1;&#x0A;+// int32 int32_field = 1;&#x0A; inline bool SimpleProto3::has_int32_field() const {&#x0A; bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U);&#x0A; return value;" type=""></failure>
</testcase>
<testcase name="third_party/protobuf/editions/golden/simple_proto3.pb.h (Java)" status="run" result="completed" classname="DiffTest">
<failure message="Value of: third_party/protobuf/editions/golden/simple_proto3.pb.h&#x0A;Expected: &#x0A;// Generated by the protocol buffer compiler. DO NOT EDIT!&#x0A;// NO CHECKED-IN PROTOBUF GENCODE&#x0A;// source: third_party/protobuf/editions/golden/simple_proto3.proto&#x0A;&#x0A;#ifndef third_5fparty_2fprotobuf_2feditions_2fgolden_2fsimple_5fproto3_2eproto_2epb_2eh&#x0A;#define third_5fparty_2fprotobuf_2feditions_2fgolden_2fsimple_5fproto3_2eproto_2epb_2eh&#x0A;&#x0A;#include &lt;limits&gt;&#x0A;#include &lt;string&gt;&#x0A;#include &lt;type_traits&gt;&#x0A;#include &lt;utility&gt;&#x0A;&#x0A;// clang-format off&#x0A;#include &quot;third_party/protobuf/runtime_version.h&quot;&#x0A;#include &quot;third_party/protobuf/io/coded_stream.h&quot;&#x0A;#include &quot;third_party/protobuf/arena.h&quot;&#x0A;#include &quot;third_party/protobuf/arenastring.h&quot;&#x0A;#include &quot;third_party/protobuf/generated_message_tctable_decl.h&quot;&#x0A;#include &quot;third_party/protobuf/generated_message_util.h&quot;&#x0A;#include &quot;third_party/protobuf/metadata_lite.h&quot;&#x0A;#include &quot;third_party/protobuf/message_lite.h&quot;&#x0A;// @@protoc_insertion_point(includes)&#x0A;&#x0A;// Must be included last.&#x0A;// clang-format on&#x0A;&#x0A;#endif // third_5fparty_2fprotobuf_2feditions_2fgolden_2fsimple_5fproto3_2eproto_2epb_2eh&#x0A;, with the difference:&#x0A;@@ @@&#x0A; enum : int {&#x0A; kInt32FieldFieldNumber = 1,&#x0A; };&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; [[nodiscard]] bool has_int32_field() const;&#x0A; void clear_int32_field() ;&#x0A; [[nodiscard]] ::int32_t int32_field() const;&#x0A;@@ @@&#x0A; &#x0A; // SimpleProto3&#x0A; &#x0A;-// optional int32 int32_field = 1;&#x0A;+// int32 int32_field = 1;&#x0A; inline bool SimpleProto3::has_int32_field() const {&#x0A; bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U);&#x0A; return value;" type=""></failure>
</testcase>
<testcase name="third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h" status="run" result="completed" classname="DiffTest">
<testcase name="third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h (Go)" status="run" result="completed" classname="DiffTest">
</testcase>
<testcase name="third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h (Java)" status="run" result="completed" classname="DiffTest">
</testcase>
<testcase name="third_party/protobuf/editions/golden/simple_proto3.proto (Go vs Java Equivalence)" status="run" result="completed" classname="EquivalenceTest">
</testcase>
</testsuite>
</testsuites>
40 changes: 28 additions & 12 deletions editions/golden/compare_cpp_codegen_multiple.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
[ RUN ] third_party/protobuf/editions/golden/simple_proto2.pb.cc
[ OK ] third_party/protobuf/editions/golden/simple_proto2.pb.cc
[ RUN ] third_party/protobuf/editions/golden/simple_proto2.pb.h
[ OK ] third_party/protobuf/editions/golden/simple_proto2.pb.h
[ RUN ] third_party/protobuf/editions/golden/simple_proto2.proto.static_reflection.h
[ OK ] third_party/protobuf/editions/golden/simple_proto2.proto.static_reflection.h
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.pb.cc
[ OK ] third_party/protobuf/editions/golden/simple_proto3.pb.cc
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.pb.h
[ OK ] third_party/protobuf/editions/golden/simple_proto3.pb.h
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h
[ OK ] third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h
[ RUN ] third_party/protobuf/editions/golden/simple_proto2.pb.cc (Go)
[ OK ] third_party/protobuf/editions/golden/simple_proto2.pb.cc (Go)
[ RUN ] third_party/protobuf/editions/golden/simple_proto2.pb.cc (Java)
[ OK ] third_party/protobuf/editions/golden/simple_proto2.pb.cc (Java)
[ RUN ] third_party/protobuf/editions/golden/simple_proto2.pb.h (Go)
[ OK ] third_party/protobuf/editions/golden/simple_proto2.pb.h (Go)
[ RUN ] third_party/protobuf/editions/golden/simple_proto2.pb.h (Java)
[ OK ] third_party/protobuf/editions/golden/simple_proto2.pb.h (Java)
[ RUN ] third_party/protobuf/editions/golden/simple_proto2.proto.static_reflection.h (Go)
[ OK ] third_party/protobuf/editions/golden/simple_proto2.proto.static_reflection.h (Go)
[ RUN ] third_party/protobuf/editions/golden/simple_proto2.proto.static_reflection.h (Java)
[ OK ] third_party/protobuf/editions/golden/simple_proto2.proto.static_reflection.h (Java)
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.pb.cc (Go)
[ OK ] third_party/protobuf/editions/golden/simple_proto3.pb.cc (Go)
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.pb.cc (Java)
[ OK ] third_party/protobuf/editions/golden/simple_proto3.pb.cc (Java)
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.pb.h (Go)
[ OK ] third_party/protobuf/editions/golden/simple_proto3.pb.h (Go)
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.pb.h (Java)
[ OK ] third_party/protobuf/editions/golden/simple_proto3.pb.h (Java)
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h (Go)
[ OK ] third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h (Go)
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h (Java)
[ OK ] third_party/protobuf/editions/golden/simple_proto3.proto.static_reflection.h (Java)
[ RUN ] third_party/protobuf/editions/golden/simple_proto2.proto (Go vs Java Equivalence)
[ OK ] third_party/protobuf/editions/golden/simple_proto2.proto (Go vs Java Equivalence)
[ RUN ] third_party/protobuf/editions/golden/simple_proto3.proto (Go vs Java Equivalence)
[ OK ] third_party/protobuf/editions/golden/simple_proto3.proto (Go vs Java Equivalence)
Loading
Loading