mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
AK: Fix StringUtils tests to actually observe return value.
Noticed this while playing around with making Optional<T> nodiscard.
This commit is contained in:
parent
88092376f3
commit
125eab998f
Notes:
sideshowbarker
2024-07-19 04:17:18 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/125eab998f8 Pull-request: https://github.com/SerenityOS/serenity/pull/3003
1 changed files with 5 additions and 5 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue