1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Added constant string appending with + operator, const string fixes

This commit is contained in:
Brian Fiete 2020-02-28 09:20:43 -08:00
parent 41cb0052b2
commit c92bc523db
14 changed files with 158 additions and 34 deletions

View file

@ -240,5 +240,20 @@ namespace Tests
Test.Assert(iVal == 123);
Test.Assert(iVal == 123.0f);
}
const String cStrD = "D";
const char8* cStrPD = "D";
[Test]
public static void TestStringOp()
{
const String cStr1 = "A" + "B";
const String cStr2 = cStr1 + "C" + cStrD;
Test.Assert(cStr2 == "ABCD");
const char8* cStr3 = "A" + "B";
const char8* cStr4 = cStr1 + "C" + cStrPD;
Test.Assert(StringView(cStr4) == "ABCD");
}
}
}