浏览代码

test: add unit tests for the String class; they currently fail

because we actually have a bug!
legacy
Sam Hocevar sam 12 年前
父节点
当前提交
a5cb244d1d
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. +2
    -0
      test/unit/string.cpp

+ 2
- 0
test/unit/string.cpp 查看文件

@@ -87,6 +87,7 @@ LOLUNIT_FIXTURE(StringTest)
String s1("ab"), s2("cd");

s1 += s2;
LOLUNIT_ASSERT_EQUAL(s1.Count(), 4);
LOLUNIT_ASSERT_EQUAL(s1[0], 'a');
LOLUNIT_ASSERT_EQUAL(s1[1], 'b');
LOLUNIT_ASSERT_EQUAL(s1[2], 'c');
@@ -94,6 +95,7 @@ LOLUNIT_FIXTURE(StringTest)
LOLUNIT_ASSERT_EQUAL(s1[4], '\0');

s2 += s2;
LOLUNIT_ASSERT_EQUAL(s2.Count(), 4);
LOLUNIT_ASSERT_EQUAL(s2[0], 'c');
LOLUNIT_ASSERT_EQUAL(s2[1], 'd');
LOLUNIT_ASSERT_EQUAL(s2[2], 'c');


正在加载...
取消
保存