Skip to content

Commit

Permalink
Renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Jan 27, 2025
1 parent 50bd61a commit d365dbf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions cpp/test/protobuf_util_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
using namespace protobuf_util;
using namespace testing;

TEST(ProtobufUtil, SerializeMessage)
TEST(ProtobufUtilTest, SerializeMessage)
{
PbResult result;

Expand All @@ -25,7 +25,7 @@ TEST(ProtobufUtil, SerializeMessage)
EXPECT_THROW(SerializeMessage(-1, result), IoException)<< "Writing a message must fail";
}

TEST(ProtobufUtil, DeserializeMessage)
TEST(ProtobufUtilTest, DeserializeMessage)
{
PbResult result;
vector<byte> buf(1);
Expand Down Expand Up @@ -54,7 +54,7 @@ TEST(ProtobufUtil, DeserializeMessage)
EXPECT_THROW(DeserializeMessage(fd2, result), IoException)<< "Invalid data were not rejected";
}

TEST(ProtobufUtil, SerializeDeserializeMessage)
TEST(ProtobufUtilTest, SerializeDeserializeMessage)
{
PbResult result;
result.set_status(true);
Expand All @@ -73,7 +73,7 @@ TEST(ProtobufUtil, SerializeDeserializeMessage)
EXPECT_TRUE(result.status());
}

TEST(ProtobufUtil, ReadBytes)
TEST(ProtobufUtilTest, ReadBytes)
{
vector<byte> buf1(1);
vector<byte> buf2;
Expand Down
20 changes: 10 additions & 10 deletions cpp/test/target_api_test.cpp → cpp/test/target_api_util_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void TestSpecialDevice(const string &name)
EXPECT_EQ("", GetParam(device, "interfaces"));
}

TEST(ProtobufUtil, ParseDeviceType)
TEST(TargetApiUtilTest, ParseDeviceType)
{
EXPECT_EQ(SCCD, ParseDeviceType("sccd"));
EXPECT_EQ(SCDP, ParseDeviceType("scdp"));
Expand All @@ -45,7 +45,7 @@ TEST(ProtobufUtil, ParseDeviceType)
EXPECT_EQ(UNDEFINED, ParseDeviceType("xyz"));
}

TEST(ProtobufUtil, ParseCachingMode)
TEST(TargetApiUtilTest, ParseCachingMode)
{
EXPECT_EQ(DEFAULT, ParseCachingMode("default"));
EXPECT_EQ(LINUX, ParseCachingMode("linux"));
Expand All @@ -58,7 +58,7 @@ TEST(ProtobufUtil, ParseCachingMode)
EXPECT_THROW(ParseCachingMode("xyz"), ParserException);
}

TEST(ProtobufUtil, GetSetParam)
TEST(TargetApiUtilTest, GetSetParam)
{
// The implementation is a function template, testing one possible T is sufficient
PbCommand command;
Expand All @@ -68,7 +68,7 @@ TEST(ProtobufUtil, GetSetParam)
EXPECT_EQ("", GetParam(command, ""));
}

TEST(ProtobufUtil, ParseParameters)
TEST(TargetApiUtilTest, ParseParameters)
{
PbDeviceDefinition device1;
ParseParameters(device1, "a=b:c=d:e");
Expand All @@ -90,7 +90,7 @@ TEST(ProtobufUtil, ParseParameters)
TestSpecialDevice("services");
}

TEST(ProtobufUtil, SetCommandParams)
TEST(TargetApiUtilTest, SetCommandParams)
{
PbCommand command1;

Expand Down Expand Up @@ -138,7 +138,7 @@ TEST(ProtobufUtil, SetCommandParams)
EXPECT_EQ("pattern", GetParam(command_generic, "folder_pattern"));
}

TEST(ProtobufUtil, SetFromGenericParams)
TEST(TargetApiUtilTest, SetFromGenericParams)
{
PbCommand command1;
EXPECT_TRUE(SetFromGenericParams(command1, "operations=mapping_info:folder_pattern=pattern").empty());
Expand All @@ -152,13 +152,13 @@ TEST(ProtobufUtil, SetFromGenericParams)
EXPECT_FALSE(SetFromGenericParams(command3, "=").empty());
}

TEST(ProtobufUtil, GetLunMax)
TEST(TargetApiUtilTest, GetLunMax)
{
EXPECT_EQ(32, GetLunMax(SCHD));
EXPECT_EQ(2, GetLunMax(SAHD));
}

TEST(ProtobufUtil, ListDevices)
TEST(TargetApiUtilTest, ListDevices)
{
vector<PbDevice> devices;

Expand All @@ -177,7 +177,7 @@ TEST(ProtobufUtil, ListDevices)
EXPECT_FALSE(device_list.empty());
}

TEST(ProtobufUtil, SetProductData)
TEST(TargetApiUtilTest, SetProductData)
{
PbDeviceDefinition device;

Expand All @@ -202,7 +202,7 @@ TEST(ProtobufUtil, SetProductData)
EXPECT_EQ("revision", device.revision());
}

TEST(ProtobufUtil, SetIdAndLun)
TEST(TargetApiUtilTest, SetIdAndLun)
{
PbDeviceDefinition device;

Expand Down

0 comments on commit d365dbf

Please sign in to comment.