pull/14409/head
xiaolou86 1 year ago
parent 3bd0f35539
commit 52126750f0
  1. 2
      bazel/BUILD
  2. 2
      protos_generator/tests/test_generated.cc
  3. 2
      rust/utf8.rs
  4. 2
      src/google/protobuf/compiler/cpp/file.cc
  5. 4
      src/google/protobuf/unknown_field_set_unittest.cc

@ -21,7 +21,7 @@ py_binary(
) )
# py_proto_library() is private rule, only intended for internal use by upb. # py_proto_library() is private rule, only intended for internal use by upb.
# Hopefully py_proto_library() will eventually be availble in rules_proto or # Hopefully py_proto_library() will eventually be available in rules_proto or
# another upstream package. # another upstream package.
bzl_library( bzl_library(
name = "py_proto_library_bzl", name = "py_proto_library_bzl",

@ -114,7 +114,7 @@ TEST(CppGeneratedCode, ScalarInt32) {
// Test int32 defaults. // Test int32 defaults.
EXPECT_EQ(testModel.value(), 0); EXPECT_EQ(testModel.value(), 0);
EXPECT_FALSE(testModel.has_value()); EXPECT_FALSE(testModel.has_value());
// Floating point defautls. // Floating point defaults.
EXPECT_EQ(std::numeric_limits<float>::infinity(), EXPECT_EQ(std::numeric_limits<float>::infinity(),
testModel.float_value_with_default()); testModel.float_value_with_default());
EXPECT_EQ(-std::numeric_limits<double>::infinity(), EXPECT_EQ(-std::numeric_limits<double>::infinity(),

@ -241,7 +241,7 @@ impl<'a> Iterator for Utf8Chunks<'a> {
/// # Safety /// # Safety
/// `index` must be in-bounds for `x` /// `index` must be in-bounds for `x`
unsafe fn split_at_unchecked(x: &[u8], index: usize) -> (&[u8], &[u8]) { unsafe fn split_at_unchecked(x: &[u8], index: usize) -> (&[u8], &[u8]) {
// SAFTEY: in-bounds as promised by the caller // SAFETY: in-bounds as promised by the caller
unsafe { (x.get_unchecked(..index), x.get_unchecked(index..)) } unsafe { (x.get_unchecked(..index), x.get_unchecked(index..)) }
} }

@ -100,7 +100,7 @@ void UnmuteWuninitialized(io::Printer* p) {
// in cases where we may declare proto B as a member of proto A using an object, // in cases where we may declare proto B as a member of proto A using an object,
// instead of a pointer. // instead of a pointer.
// //
// The proto dependencey graph can have cycles. So instead of directly working // The proto dependency graph can have cycles. So instead of directly working
// with protos, we compute strong connected components (SCCs) composed of protos // with protos, we compute strong connected components (SCCs) composed of protos
// with mutual dependence. The dependency graph on SCCs is a directed acyclic // with mutual dependence. The dependency graph on SCCs is a directed acyclic
// graph (DAG) and therefore a topological order can be computed for it i.e. an // graph (DAG) and therefore a topological order can be computed for it i.e. an

@ -614,7 +614,7 @@ TEST_F(UnknownFieldSetTest, DeleteSubrange) {
void CheckDeleteByNumber(const std::vector<int>& field_numbers, void CheckDeleteByNumber(const std::vector<int>& field_numbers,
int deleted_number, int deleted_number,
const std::vector<int>& expected_field_nubmers) { const std::vector<int>& expected_field_numbers) {
UnknownFieldSet unknown_fields; UnknownFieldSet unknown_fields;
for (int i = 0; i < field_numbers.size(); ++i) { for (int i = 0; i < field_numbers.size(); ++i) {
unknown_fields.AddFixed32(field_numbers[i], i); unknown_fields.AddFixed32(field_numbers[i], i);
@ -622,7 +622,7 @@ void CheckDeleteByNumber(const std::vector<int>& field_numbers,
unknown_fields.DeleteByNumber(deleted_number); unknown_fields.DeleteByNumber(deleted_number);
ASSERT_EQ(expected_field_nubmers.size(), unknown_fields.field_count()); ASSERT_EQ(expected_field_nubmers.size(), unknown_fields.field_count());
for (int i = 0; i < expected_field_nubmers.size(); ++i) { for (int i = 0; i < expected_field_nubmers.size(); ++i) {
EXPECT_EQ(expected_field_nubmers[i], unknown_fields.field(i).number()); EXPECT_EQ(expected_field_numbers[i], unknown_fields.field(i).number());
} }
} }

Loading…
Cancel
Save