Compare commits

...

2 Commits

Author SHA1 Message Date
d2651bf09e
Break tests
Some checks failed
continuous-integration/drone/pr Build is failing
2023-07-21 14:27:06 +02:00
de7e58c274
StringView: Fix equality operator
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-21 14:26:54 +02:00
2 changed files with 3 additions and 3 deletions

View File

@ -50,12 +50,12 @@ const char& StringView::operator[](usize index) const
bool StringView::operator==(const char* other) const bool StringView::operator==(const char* other) const
{ {
return !strncmp(m_string, other, m_length); return !strcmp(m_string, other);
} }
bool StringView::operator==(StringView other) const bool StringView::operator==(StringView other) const
{ {
return !strncmp(m_string, other.m_string, m_length); return !strcmp(m_string, other.m_string);
} }
Result<Vector<String>> StringView::split(StringView delim) const Result<Vector<String>> StringView::split(StringView delim) const

View File

@ -86,7 +86,7 @@ TestResult test_positive_signed_integer_format_with_empty_sign()
{ {
auto fmt = TRY(String::format("% d"_sv, 653)); auto fmt = TRY(String::format("% d"_sv, 653));
validate(fmt.view() == " 653"); validate(fmt.view() == " 653.000");
test_success; test_success;
} }