diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-String.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test-String.cc b/tests/test-String.cc index 8e6eacb..1f7efc0 100644 --- a/tests/test-String.cc +++ b/tests/test-String.cc @@ -27,6 +27,11 @@ void MainTask::Do() { x = y; x.do_rtrim(); Assert(x == " foo bar"); x = y; x.do_trim(); Assert(x == "foo bar"); + y = " "; + x = y; x.do_ltrim(); Assert(x == ""); + x = y; x.do_rtrim(); Assert(x == ""); + x = y; x.do_trim(); Assert(x == ""); + x = "42"; Assert(x.to_int() == 42); x = "0x42"; Assert(x.to_int() == 0x42); x = "42"; Assert(x.to_int(16) == 0x42); |