diff options
author | Brian Gianforcaro <b.gianfo@gmail.com> | 2020-08-05 03:11:59 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-05 12:18:54 +0200 |
commit | 125eab998f808f7d9341e3a2e020716ead5b9d8e (patch) | |
tree | ad7b8adadf2efb0730dec05e0618e95218914a51 /AK | |
parent | 88092376f3a984f3781dec6afdf59e93c34aa844 (diff) | |
download | serenity-125eab998f808f7d9341e3a2e020716ead5b9d8e.zip |
AK: Fix StringUtils tests to actually observe return value.
Noticed this while playing around with making Optional<T>
nodiscard.
Diffstat (limited to 'AK')
-rw-r--r-- | AK/Tests/TestStringUtils.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/AK/Tests/TestStringUtils.cpp b/AK/Tests/TestStringUtils.cpp index 2d5ecea7e0..d2a18d48df 100644 --- a/AK/Tests/TestStringUtils.cpp +++ b/AK/Tests/TestStringUtils.cpp @@ -72,16 +72,16 @@ TEST_CASE(convert_to_int) auto value = AK::StringUtils::convert_to_int(StringView()); EXPECT(!value.has_value()); - AK::StringUtils::convert_to_int(""); + value = AK::StringUtils::convert_to_int(""); EXPECT(!value.has_value()); - AK::StringUtils::convert_to_int("a"); + value = AK::StringUtils::convert_to_int("a"); EXPECT(!value.has_value()); - AK::StringUtils::convert_to_int("+"); + value = AK::StringUtils::convert_to_int("+"); EXPECT(!value.has_value()); - AK::StringUtils::convert_to_int("-"); + value = AK::StringUtils::convert_to_int("-"); EXPECT(!value.has_value()); auto actual = AK::StringUtils::convert_to_int("0"); @@ -133,7 +133,7 @@ TEST_CASE(convert_to_uint) value = AK::StringUtils::convert_to_uint("+1"); EXPECT(!value.has_value()); - AK::StringUtils::convert_to_uint("-1"); + value = AK::StringUtils::convert_to_uint("-1"); EXPECT(!value.has_value()); auto actual = AK::StringUtils::convert_to_uint("0"); |