diff --git a/upb/util/def_to_proto_test.cc b/upb/util/def_to_proto_test.cc index 18d2304401..e5d4b37086 100644 --- a/upb/util/def_to_proto_test.cc +++ b/upb/util/def_to_proto_test.cc @@ -270,6 +270,17 @@ TEST(FuzzTest, DefaultWithValidHexEscapePrintable) { // weak_dependency: 0 // })pb")); // } +// +// TEST(FuzzTest, NanInOptions) { +// RoundTripDescriptor( +// ParseTextProtoOrDie(R"pb(file { +// name: "" +// service { +// name: "A" +// options { failure_detection_delay: nan } +// } +// })pb")); +// } // end:google_only TEST(FuzzTest, PackageStartsWithNumber) { diff --git a/upb/util/def_to_proto_test.h b/upb/util/def_to_proto_test.h index 809a7cab46..7668223858 100644 --- a/upb/util/def_to_proto_test.h +++ b/upb/util/def_to_proto_test.h @@ -30,7 +30,7 @@ MATCHER_P(EqualsProtoTreatNansAsEqual, proto, google::protobuf::util::MessageDifferencer differencer; differencer.set_field_comparator(&comparator); differencer.ReportDifferencesToString(&differences); - bool eq = differencer.Equals(proto, arg); + bool eq = differencer.Compare(proto, arg); if (!eq) { *result_listener << differences; }