commit
9038c1c568
@ -0,0 +1 @@
|
||||
Subproject commit 2fe3bd994b3189899d93f1d5a881e725e046fdc2
|
@ -0,0 +1,19 @@
|
||||
|
||||
#include "MiscUtils.h"
|
||||
#include <gtest/gtest.h>
|
||||
#include <string>
|
||||
|
||||
TEST(MiscUtils, wordwrap) {
|
||||
std::vector<std::string> result;
|
||||
|
||||
word_wrap(&result, "123", 3);
|
||||
ASSERT_EQ(result.size(), 1);
|
||||
|
||||
result.clear();
|
||||
word_wrap(&result, "123456", 3);
|
||||
ASSERT_EQ(result.size(), 2);
|
||||
|
||||
result.clear();
|
||||
word_wrap(&result, "1234567", 3);
|
||||
ASSERT_EQ(result.size(), 3);
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
Loading…
Reference in New Issue