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:
parent
41cb0052b2
commit
c92bc523db
14 changed files with 158 additions and 34 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue