Portability

- Fixed compiler error for new unit tests.
This commit is contained in:
Paul Beckingham 2013-01-19 13:45:58 -05:00
parent a0d6b3198e
commit 7e3ee1b284

View file

@ -46,12 +46,12 @@ int main (int argc, char** argv)
// TODO int utf8_sequence (unsigned int); // TODO int utf8_sequence (unsigned int);
// unsigned int utf8_length (const std::string&); // unsigned int utf8_length (const std::string&);
t.is (utf8_length (ascii_text), 14, "ASCII utf8_length"); t.is ((int) utf8_length (ascii_text), 14, "ASCII utf8_length");
t.is (utf8_length (utf8_text), 20, "UTF8 utf8_length"); t.is ((int) utf8_length (utf8_text), 20, "UTF8 utf8_length");
// unsigned int utf8_text_length (const std::string&); // unsigned int utf8_text_length (const std::string&);
t.is (utf8_text_length (ascii_text_color), 14, "ASCII utf8_text_length"); t.is ((int) utf8_text_length (ascii_text_color), 14, "ASCII utf8_text_length");
t.is (utf8_text_length (utf8_text_color), 20, "UTF8 utf8_text_length"); t.is ((int) utf8_text_length (utf8_text_color), 20, "UTF8 utf8_text_length");
// const std::string utf8_substr (const std::string&, unsigned int, unsigned int length = 0); // const std::string utf8_substr (const std::string&, unsigned int, unsigned int length = 0);
t.is (utf8_substr (ascii_text, 0, 2), "Th", "ASCII utf8_substr"); t.is (utf8_substr (ascii_text, 0, 2), "Th", "ASCII utf8_substr");