Skip to content

Commit

Permalink
Add regression test for #57 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewhickman committed Apr 3, 2024
1 parent 1fd0981 commit fdc5bd9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 52 deletions.
62 changes: 12 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions protox/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ bytes = "1.5.0"
clap = { version = "4.5.2", features = ["derive"], optional = true }
miette = "7.2.0"
prost = "0.12.1"
prost-reflect = { version = "0.13.0", features = ["miette", "text-format"] }
prost-reflect = { version = "0.13.1", features = ["miette", "text-format"] }
prost-types = "0.12.1"
protox-parse = { version = "0.6.0", path = "../protox-parse" }
thiserror = "1.0.57"

[dev-dependencies]
insta = { version = "1.36.1", features = ["yaml"] }
prost-build = { version = "0.12.1" }
prost-reflect = { version = "0.13.0", features = ["serde"] }
prost-reflect = { version = "0.13.1", features = ["serde"] }
once_cell = { version = "1.12.0", default_features = false }
scopeguard = "1.1.0"
serde_yaml = "0.9.32"
Expand Down
1 change: 1 addition & 0 deletions protox/tests/compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ compare!(reserved_ranges);
compare!(oneof_group_field);
compare!(service);
compare!(option_group_field);
compare!(message_name_field_name_conflict);

#[test]
fn google_protobuf_any() {
Expand Down
17 changes: 17 additions & 0 deletions protox/tests/data/message_name_field_name_conflict.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Regression test for https://github.com/andrewhickman/protox/issues/57
syntax = "proto3";

message Parent {
ChildMessage ChildMessage = 1;
ChildEnum ChildEnum = 2;
}

message ChildMessage {
string field = 1;
}

enum ChildEnum {
UNKNOWN = 0;
A = 1;
B = 2;
}

0 comments on commit fdc5bd9

Please sign in to comment.