diff options
author | Pixel <pixel@nobis-crew.org> | 2011-10-18 08:59:58 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-10-18 08:59:58 -0700 |
commit | 56837535aeb1c7ae0fa2730d77dd718c334cf729 (patch) | |
tree | 12ac2be529bb633dd7a49c917f0601bd60f5c3b1 /tests | |
parent | ea271d967c52892a61f2b2db754780912e0f7cef (diff) |
And so kids, this is why we have unit tests.
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); |