Loading broadcastradio/2.0/types.hal +3 −1 Original line number Diff line number Diff line Loading @@ -215,7 +215,9 @@ struct DabTableEntry { /** * Channel name, i.e. 5A, 7B. * * It must match the following regular expression: /^[A-Z0-9]{2,5}$/. * It must match the following regular expression: * /^[A-Z0-9][A-Z0-9 ]{0,5}[A-Z0-9]$/ (2-7 uppercase alphanumeric characters * without spaces allowed at the beginning nor end). */ string label; Loading broadcastradio/2.0/vts/functional/VtsHalBroadcastradioV2_0TargetTest.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -342,11 +342,13 @@ TEST_F(BroadcastRadioHalTest, GetDabRegionConfig) { } ASSERT_EQ(Result::OK, halResult); std::regex re("^[A-Z0-9]{2,5}$"); std::regex re("^[A-Z0-9][A-Z0-9 ]{0,5}[A-Z0-9]$"); // double-check correctness of the test ASSERT_TRUE(std::regex_match("5A", re)); ASSERT_FALSE(std::regex_match("5a", re)); ASSERT_FALSE(std::regex_match("123ABC", re)); ASSERT_FALSE(std::regex_match("1234ABCD", re)); ASSERT_TRUE(std::regex_match("CN 12D", re)); ASSERT_FALSE(std::regex_match(" 5A", re)); for (auto&& entry : config) { EXPECT_TRUE(std::regex_match(std::string(entry.label), re)); Loading Loading
broadcastradio/2.0/types.hal +3 −1 Original line number Diff line number Diff line Loading @@ -215,7 +215,9 @@ struct DabTableEntry { /** * Channel name, i.e. 5A, 7B. * * It must match the following regular expression: /^[A-Z0-9]{2,5}$/. * It must match the following regular expression: * /^[A-Z0-9][A-Z0-9 ]{0,5}[A-Z0-9]$/ (2-7 uppercase alphanumeric characters * without spaces allowed at the beginning nor end). */ string label; Loading
broadcastradio/2.0/vts/functional/VtsHalBroadcastradioV2_0TargetTest.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -342,11 +342,13 @@ TEST_F(BroadcastRadioHalTest, GetDabRegionConfig) { } ASSERT_EQ(Result::OK, halResult); std::regex re("^[A-Z0-9]{2,5}$"); std::regex re("^[A-Z0-9][A-Z0-9 ]{0,5}[A-Z0-9]$"); // double-check correctness of the test ASSERT_TRUE(std::regex_match("5A", re)); ASSERT_FALSE(std::regex_match("5a", re)); ASSERT_FALSE(std::regex_match("123ABC", re)); ASSERT_FALSE(std::regex_match("1234ABCD", re)); ASSERT_TRUE(std::regex_match("CN 12D", re)); ASSERT_FALSE(std::regex_match(" 5A", re)); for (auto&& entry : config) { EXPECT_TRUE(std::regex_match(std::string(entry.label), re)); Loading