Skip to content

Commit

Permalink
Differentiate message names
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll committed Apr 1, 2024
1 parent 42ff5a2 commit 317d704
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion test/desc/testing.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package testing;

message Bytes
message BarBytes
{
bytes data = 1;
}
24 changes: 12 additions & 12 deletions test/desc/testing.proto.bin
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@

C
testing/bytes.prototesting"
Bytes
data ( Rdatabproto3
�
testing/message.prototesting"
�
testing/message.prototesting"

FooMessage
foo ( Rfoo"
FooMessage
data ( Rdata"3

BarMessage
foo ( Rfoo"
BarMessage%
foo ( 2.testing.FooMessageRfoo"3

BazMessage
foo ( Rfoobproto3
BazMessage%
bar ( 2.testing.BarMessageRbarbproto3
F
testing/bytes.prototesting"
FooBytes
data ( Rdatabproto3
2 changes: 1 addition & 1 deletion test/desc/testing/bytes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package testing;

message Bytes
message FooBytes
{
bytes data = 1;
}
4 changes: 2 additions & 2 deletions test/integration/descriptors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ TEST(FactoryTest, DynamicFactory)
gz::msgs::Factory::LoadDescriptors(paths);
}
EXPECT_EQ(nullptr, gz::msgs::Factory::New("example.msgs.StringMsg"));
EXPECT_EQ(nullptr, gz::msgs::Factory::New("testing.Bytes"));
EXPECT_EQ(nullptr, gz::msgs::Factory::New("testing.BarBytes"));
EXPECT_EQ(nullptr, gz::msgs::Factory::New("testing.FooMessage"));
EXPECT_EQ(nullptr, gz::msgs::Factory::New("testing.BarMessage"));
EXPECT_EQ(nullptr, gz::msgs::Factory::New("testing.BazMessage"));
Expand All @@ -88,7 +88,7 @@ TEST(FactoryTest, DynamicFactory)
}

EXPECT_NE(nullptr, gz::msgs::Factory::New("example.msgs.StringMsg"));
EXPECT_NE(nullptr, gz::msgs::Factory::New("testing.Bytes"));
EXPECT_NE(nullptr, gz::msgs::Factory::New("testing.FooBytes"));
EXPECT_NE(nullptr, gz::msgs::Factory::New("testing.FooMessage"));
EXPECT_NE(nullptr, gz::msgs::Factory::New("testing.BarMessage"));
EXPECT_NE(nullptr, gz::msgs::Factory::New("testing.BazMessage"));
Expand Down

0 comments on commit 317d704

Please sign in to comment.