[ox/std] Make String(StringView) constructor explicit, add StringLiteral

This commit is contained in:
2023-11-28 23:31:11 -06:00
parent 7008ebfb40
commit 3a62650d62
10 changed files with 137 additions and 243 deletions

View File

@@ -105,6 +105,10 @@ static std::map<ox::String, ox::Error(*)()> tests = {
oxAssert(endsWith(str, "df"), "String endsWith is broken");
oxAssert(!endsWith(str, "awefawe"), "String endsWith is broken");
oxAssert(!endsWith(str, "eu"), "String endsWith is broken");
oxAssert(ox::StringView("Write") != ox::String(""), "String / StringView comparison broken");
oxAssert(ox::String("Write") != ox::StringView(""), "String / StringView comparison broken");
oxAssert(ox::String("Write") == ox::StringView("Write"), "String / StringView comparison broken");
oxAssert(ox::String(ox::StringView("Write")) == ox::StringView("Write"), "String / StringView comparison broken");
return OxError(0);
}
},