diff options
Diffstat (limited to 'adb/adb_utils_test.cpp')
-rw-r--r-- | adb/adb_utils_test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/adb/adb_utils_test.cpp b/adb/adb_utils_test.cpp index 8518e17825..bd676c2deb 100644 --- a/adb/adb_utils_test.cpp +++ b/adb/adb_utils_test.cpp @@ -206,6 +206,14 @@ void TestParseUint(std::string_view string, bool expected_success, uint32_t expe EXPECT_EQ(remaining, "foo"); } } + + // With trailing text, without remaining. + { + std::string text = std::string(string) + "foo"; + uint32_t value; + bool success = ParseUint(&value, text, nullptr); + EXPECT_EQ(success, false); + } } TEST(adb_utils, ParseUint) { |