From d33c09d74a46730af61ee851478ec843f0705e53 Mon Sep 17 00:00:00 2001 From: yanyiwu Date: Sat, 27 Jun 2015 12:34:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/unittest/TApplication.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/unittest/TApplication.cpp b/test/unittest/TApplication.cpp index 7aef022..634cae5 100644 --- a/test/unittest/TApplication.cpp +++ b/test/unittest/TApplication.cpp @@ -69,4 +69,13 @@ TEST(ApplicationTest, InsertUserWord) { app.cut("男默女泪", words); result << words; ASSERT_EQ("[\"男默女泪\"]", result); + + for(size_t i = 0; i < 100; i++) { + string newWord; + newWord << rand(); + ASSERT_TRUE(app.insertUserWord(newWord)); + app.cut(newWord, words); + result << words; + ASSERT_EQ(result, string_format("[\"%s\"]", newWord.c_str())); + } }