/*********************************************************************** * fterm_functions-test.cpp - FTerm function unit tests * * * * This file is part of the FINAL CUT widget toolkit * * * * Copyright 2021 Markus Gans * * * * FINAL CUT is free software; you can redistribute it and/or modify * * it under the terms of the GNU Lesser General Public License as * * published by the Free Software Foundation; either version 3 of * * the License, or (at your option) any later version. * * * * FINAL CUT is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this program. If not, see * * . * ***********************************************************************/ #include #include #include #include #include #include #include #include #include #include #include //---------------------------------------------------------------------- // class FTermFunctionsTest //---------------------------------------------------------------------- class FTermFunctionsTest : public CPPUNIT_NS::TestFixture, test::ConEmu { public: FTermFunctionsTest() { auto ret = std::setlocale (LC_CTYPE, "en_US.UTF-8"); if ( ! ret ) ret = std::setlocale (LC_CTYPE, "C.UTF-8"); fwide(stdout, 1); // Makes stream wide-character oriented } protected: void env2uintTest(); void isReverseNewFontcharTest(); void cp437Test(); void FullWidthHalfWidthTest(); void combiningCharacterTest(); void readCursorPosTest(); private: // Constant constexpr static std::size_t NOT_FOUND = static_cast(-1); // Adds code needed to register the test suite CPPUNIT_TEST_SUITE (FTermFunctionsTest); // Add a methods to the test suite CPPUNIT_TEST (env2uintTest); CPPUNIT_TEST (isReverseNewFontcharTest); CPPUNIT_TEST (cp437Test); CPPUNIT_TEST (FullWidthHalfWidthTest); CPPUNIT_TEST (combiningCharacterTest); CPPUNIT_TEST (readCursorPosTest); // End of test suite definition CPPUNIT_TEST_SUITE_END(); }; //---------------------------------------------------------------------- void FTermFunctionsTest::env2uintTest() { setenv ("NUM1", "123", 1); CPPUNIT_ASSERT ( finalcut::env2uint("NUM1") == 123 ); setenv ("NUM2", "4294967295", 1); CPPUNIT_ASSERT ( finalcut::env2uint("NUM2") == UINT_MAX ); // Overflow setenv ("NUM3", "999999999999999999999999999999999", 1); CPPUNIT_ASSERT ( finalcut::env2uint("NUM3") == UINT_MAX ); // not unsigned! setenv ("NUM4", "-123", 1); CPPUNIT_ASSERT ( finalcut::env2uint("NUM4") == 0 ); // Invalid CPPUNIT_ASSERT ( finalcut::env2uint("NON_EXISTENT_VARIABLE") == 0 ); } //---------------------------------------------------------------------- void FTermFunctionsTest::isReverseNewFontcharTest() { CPPUNIT_ASSERT ( ! finalcut::isReverseNewFontchar(L'A') ); CPPUNIT_ASSERT ( ! finalcut::isReverseNewFontchar(L'£') ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_left_arrow2)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_right_arrow2)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_border_corner_upper_right)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_border_line_right)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_border_line_vertical_left)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_border_corner_lower_right)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_up_arrow2)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_down_arrow2)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_up_arrow1)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_down_arrow1)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_left_arrow1)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_right_arrow1)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_menu_button1)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_menu_button2)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_up_pointing_triangle1)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_down_pointing_triangle1)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_up_pointing_triangle2)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_down_pointing_triangle2)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_menu_button3)) ); CPPUNIT_ASSERT ( finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_rev_border_line_right_and_left)) ); CPPUNIT_ASSERT ( ! finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_shadow_box_checked)) ); CPPUNIT_ASSERT ( ! finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::NF_Bullet)) ); CPPUNIT_ASSERT ( ! finalcut::isReverseNewFontchar(wchar_t(finalcut::UniChar::SquareRoot)) ); } //---------------------------------------------------------------------- void FTermFunctionsTest::cp437Test() { // CP437 -> Unicode CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x01) == L'☺' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x02) == L'☻' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x03) == L'♥' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x04) == L'♦' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x05) == L'♣' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x06) == L'♠' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x07) == L'•' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x08) == L'◘' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x09) == L'○' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x0a) == L'◙' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x0b) == L'♂' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x0c) == L'♀' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x0d) == L'♪' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x0e) == L'♫' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x0f) == L'☼' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x10) == L'►' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x11) == L'◄' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x12) == L'↕' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x13) == L'‼' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x14) == L'¶' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x15) == L'§' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x16) == L'▬' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x17) == L'↨' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x18) == L'↑' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x19) == L'↓' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x1a) == L'→' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x1b) == L'←' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x1c) == L'∟' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x1d) == L'↔' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x1e) == L'▲' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x1f) == L'▼' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x9b) == L'¢' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x9c) == L'£' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x9d) == L'¥' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0x9e) == L'₧' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xb0) == L'░' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xb1) == L'▒' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xb2) == L'▓' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xdb) == L'█' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xdf) == L'▀' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xdc) == L'▄' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xdd) == L'▌' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xde) == L'▐' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xc4) == L'─' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xb3) == L'│' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xc3) == L'├' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xb4) == L'┤' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xc5) == L'┼' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xbf) == L'┐' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xc0) == L'└' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xda) == L'┌' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xd9) == L'┘' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xf4) == L'⌠' ); CPPUNIT_ASSERT ( finalcut::cp437_to_unicode(0xf5) == L'⌡' ); // Unicode -> CP437 CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'☺') == 0x01 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'☻') == 0x02 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'♥') == 0x03 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'♦') == 0x04 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'♣') == 0x05 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'♠') == 0x06 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'•') == 0x07 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'◘') == 0x08 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'○') == 0x09 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'◙') == 0x0a ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'♂') == 0x0b ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'♀') == 0x0c ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'♪') == 0x0d ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'♫') == 0x0e ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'☼') == 0x0f ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'►') == 0x10 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'◄') == 0x11 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'↕') == 0x12 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'‼') == 0x13 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'¶') == 0x14 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'§') == 0x15 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'▬') == 0x16 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'↨') == 0x17 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'↑') == 0x18 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'↓') == 0x19 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'→') == 0x1a ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'←') == 0x1b ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'∟') == 0x1c ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'↔') == 0x1d ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'▲') == 0x1e ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'▼') == 0x1f ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'¢') == 0x9b ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'£') == 0x9c ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'¥') == 0x9d ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'₧') == 0x9e ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'░') == 0xb0 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'▒') == 0xb1 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'▓') == 0xb2 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'█') == 0xdb ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'▀') == 0xdf ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'▄') == 0xdc ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'▌') == 0xdd ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'▐') == 0xde ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'─') == 0xc4 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'│') == 0xb3 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'├') == 0xc3 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'┤') == 0xb4 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'┼') == 0xc5 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'┐') == 0xbf ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'└') == 0xc0 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'┌') == 0xda ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'┘') == 0xd9 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'⌠') == 0xf4 ); CPPUNIT_ASSERT ( finalcut::unicode_to_cp437(L'⌡') == 0xf5 ); } //---------------------------------------------------------------------- void FTermFunctionsTest::FullWidthHalfWidthTest() { CPPUNIT_ASSERT ( finalcut::hasFullWidthSupports() ); // Test the conversion from half-width to full-width characters CPPUNIT_ASSERT ( finalcut::getFullWidth(L' ') == L" " ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'!') == L"!" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'"') == L""" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'#') == L"#" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'$') == L"$" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'%') == L"%" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'&') == L"&" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'\'') == L"'" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'(') == L"(" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L')') == L")" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'*') == L"*" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'+') == L"+" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L',') == L"," ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'-') == L"-" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'.') == L"." ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'/') == L"/" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'0') == L"0" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'1') == L"1" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'2') == L"2" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'3') == L"3" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'4') == L"4" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'5') == L"5" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'6') == L"6" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'7') == L"7" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'8') == L"8" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'9') == L"9" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L':') == L":" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L';') == L";" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'<') == L"<" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'=') == L"=" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'>') == L">" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'?') == L"?" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'@') == L"@" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'A') == L"A" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'B') == L"B" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'C') == L"C" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'D') == L"D" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'E') == L"E" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'F') == L"F" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'G') == L"G" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'H') == L"H" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'I') == L"I" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'J') == L"J" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'K') == L"K" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'L') == L"L" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'M') == L"M" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'N') == L"N" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'O') == L"O" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'P') == L"P" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'Q') == L"Q" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'R') == L"R" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'S') == L"S" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'T') == L"T" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'U') == L"U" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'V') == L"V" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'W') == L"W" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'X') == L"X" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'Y') == L"Y" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'Z') == L"Z" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'[') == L"[" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'\\') == L"\" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L']') == L"]" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'^') == L"^" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'_') == L"_" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'`') == L"`" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'a') == L"a" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'b') == L"b" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'c') == L"c" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'd') == L"d" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'e') == L"e" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'f') == L"f" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'g') == L"g" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'h') == L"h" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'i') == L"i" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'j') == L"j" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'k') == L"k" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'l') == L"l" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'm') == L"m" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'n') == L"n" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'o') == L"o" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'p') == L"p" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'q') == L"q" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'r') == L"r" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L's') == L"s" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L't') == L"t" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'u') == L"u" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'v') == L"v" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'w') == L"w" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'x') == L"x" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'y') == L"y" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'z') == L"z" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'{') == L"{" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'|') == L"|" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'}') == L"}" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'~') == L"~" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'←') == L"←" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'↑') == L"↑" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'→') == L"→" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'↓') == L"↓" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'¢') == L"¢" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'£') == L"£" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'ア') == L"ア" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'イ') == L"イ" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'ウ') == L"ウ" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'エ') == L"エ" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'ᄀ') == L"ㄱ" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'ᄁ') == L"ㄲ" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'ᆪ') == L"ㄳ" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'ᄂ') == L"ㄴ" ); // Only half-width CPPUNIT_ASSERT ( finalcut::getFullWidth(L'Ā') == L"Ā" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'ā') == L"ā" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'Ă') == L"Ă" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'ă') == L"ă" ); CPPUNIT_ASSERT ( finalcut::getFullWidth(L'Ą') == L"Ą" ); // Test the conversion from full-width to half-width characters CPPUNIT_ASSERT ( finalcut::getHalfWidth(L" ") == L" " ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"!") == L"!" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L""") == L"\"" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"#") == L"#" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"$") == L"$" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"%") == L"%" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"&") == L"&" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"'") == L"'" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"(") == L"(" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L")") == L")" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"*") == L"*" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"+") == L"+" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L",") == L"," ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"-") == L"-" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L".") == L"." ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"/") == L"/" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"0") == L"0" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"1") == L"1" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"2") == L"2" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"3") == L"3" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"4") == L"4" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"5") == L"5" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"6") == L"6" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"7") == L"7" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"8") == L"8" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"9") == L"9" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L":") == L":" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L";") == L";" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"<") == L"<" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"=") == L"=" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L">") == L">" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"?") == L"?" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"@") == L"@" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"A") == L"A" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"B") == L"B" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"C") == L"C" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"D") == L"D" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"E") == L"E" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"F") == L"F" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"G") == L"G" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"H") == L"H" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"I") == L"I" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"J") == L"J" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"K") == L"K" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"L") == L"L" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"M") == L"M" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"N") == L"N" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"O") == L"O" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"P") == L"P" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"Q") == L"Q" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"R") == L"R" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"S") == L"S" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"T") == L"T" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"U") == L"U" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"V") == L"V" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"W") == L"W" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"X") == L"X" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"Y") == L"Y" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"Z") == L"Z" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"[") == L"[" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"\") == L"\\" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"]") == L"]" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"^") == L"^" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"_") == L"_" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"`") == L"`" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"a") == L"a" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"b") == L"b" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"c") == L"c" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"d") == L"d" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"e") == L"e" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"f") == L"f" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"g") == L"g" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"h") == L"h" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"i") == L"i" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"j") == L"j" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"k") == L"k" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"l") == L"l" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"m") == L"m" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"n") == L"n" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"o") == L"o" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"p") == L"p" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"q") == L"q" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"r") == L"r" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"s") == L"s" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"t") == L"t" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"u") == L"u" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"v") == L"v" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"w") == L"w" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"x") == L"x" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"y") == L"y" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"z") == L"z" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"{") == L"{" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"|") == L"|" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"}") == L"}" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"~") == L"~" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"←" ) == L"←"); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"↑" ) == L"↑"); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"→" ) == L"→"); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"↓" ) == L"↓"); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"¢") == L"¢" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"£") == L"£" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"ア") == L"ア" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"イ") == L"イ" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"ウ") == L"ウ" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"エ") == L"エ" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"ㄱ") == L"ᄀ" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"ㄲ") == L"ᄁ" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"ㄳ") == L"ᆪ" ); CPPUNIT_ASSERT ( finalcut::getHalfWidth(L"ㄴ") == L"ᄂ" ); // Column width (wchar_t) const auto& data = finalcut::FTerm::getFTermData(); data->setTermEncoding (finalcut::Encoding::UTF8); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\t") == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\r") == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\n") == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\v") == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L" ") == 1 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"0") == 1 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1") == 1 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"2") == 1 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"3") == 1 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"0") == 2 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1") == 2 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"2") == 2 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"3") == 2 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\U00000300") == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\U00000348") == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\U0000094d") == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\U00000e37") == 0 ); // Column width (wchar_t) in latin-1 std::setlocale (LC_CTYPE, "C"); data->setTermEncoding (finalcut::Encoding::VT100); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L'─') == 1 ); // wcwidth(L'─') == -1 (for LC_CTYPE = C) CPPUNIT_ASSERT ( finalcut::getColumnWidth(L'│') == 1 ); // wcwidth(L'│') == -1 (for LC_CTYPE = C) CPPUNIT_ASSERT ( finalcut::getColumnWidth(L'├') == 1 ); // wcwidth(L'├') == -1 (for LC_CTYPE = C) CPPUNIT_ASSERT ( finalcut::getColumnWidth(L'┤') == 1 ); // wcwidth(L'┤') == -1 (for LC_CTYPE = C) CPPUNIT_ASSERT ( finalcut::getColumnWidth(L'┼') == 1 ); // wcwidth(L'┼') == -1 (for LC_CTYPE = C) CPPUNIT_ASSERT ( finalcut::getColumnWidth(L'┐') == 1 ); // wcwidth(L'┐') == -1 (for LC_CTYPE = C) CPPUNIT_ASSERT ( finalcut::getColumnWidth(L'└') == 1 ); // wcwidth(L'└') == -1 (for LC_CTYPE = C) CPPUNIT_ASSERT ( finalcut::getColumnWidth(L'┌') == 1 ); // wcwidth(L'┌') == -1 (for LC_CTYPE = C) CPPUNIT_ASSERT ( finalcut::getColumnWidth(L'┘') == 1 ); // wcwidth(L'┘') == -1 (for LC_CTYPE = C) auto ret = std::setlocale (LC_CTYPE, "en_US.UTF-8"); if ( ! ret ) ret = std::setlocale (LC_CTYPE, "C.UTF-8"); data->setTermEncoding (finalcut::Encoding::UTF8); // Column width (FString) CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\v\t 100") == 4 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"0123456789") == 10 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"0123456789") == 20 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"abc") == 3 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"abc") == 5 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好") == 4 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more") == 20 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more") == 23 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"o\U0000031b\U00000323=\U00001ee3") == 3 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"STARGΛ̊TE") == 8 ); // Column width (FString) with end position CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\v\t 100", 0) == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\v\t 100", 1) == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\v\t 100", 2) == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\v\t 100", 3) == 1 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\v\t 100", 4) == 2 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\v\t 100", 5) == 3 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\v\t 100", 6) == 4 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"\v\t 100", 7) == 4 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"0123", 0) == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"0123", 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"0123", 2) == 2 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"0123", 3) == 3 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"0123", 4) == 4 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"0123", 0) == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"0123", 1) == 2 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"0123", 2) == 4 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"0123", 3) == 6 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"0123", 4) == 8 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 0) == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 1) == 2 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 2) == 4 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 3) == 5 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 4) == 6 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 5) == 7 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 6) == 8 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 7) == 9 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 8) == 11 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 9) == 13 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 10) == 15 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 11) == 16 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 12) == 17 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 13) == 18 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 14) == 19 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"你好 one CUT more", 15) == 20 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 0) == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 2) == 2 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 3) == 3 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 4) == 4 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 5) == 5 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 6) == 6 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 7) == 7 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 8) == 8 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 9) == 9 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 10) == 10 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 11) == 11 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 12) == 12 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 13) == 14 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 14) == 16 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 15) == 18 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 16) == 19 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 17) == 20 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 18) == 21 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 19) == 22 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"1234567 one CUT more", 20) == 23 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"o\U0000031b\U00000323=\U00001ee3", 0) == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"o\U0000031b\U00000323=\U00001ee3", 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"o\U0000031b\U00000323=\U00001ee3", 2) == 1 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"o\U0000031b\U00000323=\U00001ee3", 3) == 1 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"o\U0000031b\U00000323=\U00001ee3", 4) == 2 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"o\U0000031b\U00000323=\U00001ee3", 5) == 3 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"STARGΛ̊TE", 0) == 0 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"STARGΛ̊TE", 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"STARGΛ̊TE", 2) == 2 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"STARGΛ̊TE", 3) == 3 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"STARGΛ̊TE", 4) == 4 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"STARGΛ̊TE", 5) == 5 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"STARGΛ̊TE", 6) == 6 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"STARGΛ̊TE", 7) == 6 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"STARGΛ̊TE", 8) == 7 ); CPPUNIT_ASSERT ( finalcut::getColumnWidth(L"STARGΛ̊TE", 9) == 8 ); // String length from the first to the specified end column CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"\v\t 100", 0) == 0 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"\v\t 100", 1) == 3 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"\v\t 100", 2) == 4 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"\v\t 100", 3) == 5 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"\v\t 100", 4) == 6 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"\v\t 100", 5) == 6 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"0123", 0) == 0 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"0123", 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"0123", 2) == 2 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"0123", 3) == 3 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"0123", 4) == 4 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"0123", 0) == 0 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"0123", 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"0123", 2) == 1 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"0123", 3) == 2 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"0123", 4) == 2 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"0123", 5) == 3 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"0123", 6) == 3 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"0123", 7) == 4 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"0123", 8) == 4 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 0) == 0 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 2) == 1 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 3) == 2 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 4) == 2 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 5) == 3 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 6) == 4 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 7) == 5 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 8) == 6 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 9) == 7 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 10) == 8 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 11) == 8 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 12) == 9 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 13) == 9 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 14) == 10 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 15) == 10 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 16) == 11 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 17) == 12 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 18) == 13 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 19) == 14 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"你好 one CUT more", 20) == 15 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 0) == 0 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 2) == 2 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 3) == 3 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 4) == 4 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 5) == 5 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 6) == 6 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 7) == 7 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 8) == 8 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 9) == 9 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 10) == 10 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 11) == 11 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 12) == 12 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 13) == 13 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 14) == 13 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 15) == 14 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 16) == 14 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 17) == 15 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 18) == 15 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 19) == 16 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 20) == 17 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 21) == 18 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 22) == 19 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"1234567 one CUT more", 23) == 20 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"o\U0000031b\U00000323=\U00001ee3", 0) == 0 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"o\U0000031b\U00000323=\U00001ee3", 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"o\U0000031b\U00000323=\U00001ee3", 2) == 4 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"o\U0000031b\U00000323=\U00001ee3", 3) == 5 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"STARGΛ̊TE", 0) == 0 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"STARGΛ̊TE", 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"STARGΛ̊TE", 2) == 2 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"STARGΛ̊TE", 3) == 3 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"STARGΛ̊TE", 4) == 4 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"STARGΛ̊TE", 5) == 5 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"STARGΛ̊TE", 6) == 6 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"STARGΛ̊TE", 7) == 8 ); CPPUNIT_ASSERT ( finalcut::getLengthFromColumnWidth(L"STARGΛ̊TE", 8) == 9 ); // Column width (FChar) finalcut::FChar fchar{}; std::wstring s = L"1"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 1 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"\t"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"\r"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"\n"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"\v"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L" "; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 1 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"0"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 1 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"1"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 1 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"2"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 1 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"3"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 1 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"0"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 2 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"1"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 2 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"2"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 2 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"3"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 2 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"\U00000300"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"\U00000348"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"\U0000094d"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); fchar.attr.bit.char_width = 0x00 & 0x03; s = L"\U00000e37"; std::copy(std::begin(s), std::end(s), std::begin(fchar.ch)); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); finalcut::addColumnWidth(fchar); CPPUNIT_ASSERT ( finalcut::getColumnWidth(fchar) == 0 ); fchar.attr.bit.char_width = 0x00 & 0x03; // Column width (FTermBuffer) finalcut::FTermBuffer term_buf{}; term_buf << L"\v\t 100"; CPPUNIT_ASSERT ( finalcut::getColumnWidth(term_buf) == 4 ); term_buf.clear(); term_buf << L"0123456789"; CPPUNIT_ASSERT ( finalcut::getColumnWidth(term_buf) == 10 ); term_buf.clear(); term_buf << L"0123456789"; CPPUNIT_ASSERT ( finalcut::getColumnWidth(term_buf) == 20 ); // UTF-8 term_buf.clear(); data->setTermEncoding (finalcut::Encoding::PC); term_buf << L"0123456789"; CPPUNIT_ASSERT ( finalcut::getColumnWidth(term_buf) == 10 ); // CP-437 term_buf.clear(); data->setTermEncoding (finalcut::Encoding::UTF8); CPPUNIT_ASSERT ( finalcut::getColumnWidth(term_buf) == 0 ); // after clear term_buf << L"abc"; CPPUNIT_ASSERT ( finalcut::getColumnWidth(term_buf) == 3 ); term_buf.clear(); term_buf << L"abc"; CPPUNIT_ASSERT ( finalcut::getColumnWidth(term_buf) == 5 ); term_buf.clear(); term_buf << L"你好"; CPPUNIT_ASSERT ( finalcut::getColumnWidth(term_buf) == 4 ); term_buf.clear(); term_buf << L"你好 one CUT more"; CPPUNIT_ASSERT ( finalcut::getColumnWidth(term_buf) == 20 ); term_buf.clear(); term_buf << L"1234567 one CUT more"; CPPUNIT_ASSERT ( finalcut::getColumnWidth(term_buf) == 23 ); term_buf.clear(); term_buf << L"o\U0000031b\U00000323=\U00001ee3"; CPPUNIT_ASSERT ( finalcut::getColumnWidth(term_buf) == 3 ); term_buf.clear(); term_buf << L"STARGΛ̊TE"; CPPUNIT_ASSERT ( finalcut::getColumnWidth(term_buf) == 8 ); // Extracts a substring that starts at a specified column position // and has a specified number of columns CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 0, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 1, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 2, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 3, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 4, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 5, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 0, 1) == L" " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 1, 1) == L" " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 2, 1) == L"1" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 3, 1) == L"0" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 4, 1) == L"0" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 5, 1) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 0, 2) == L" 1" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 1, 2) == L" 1" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 2, 2) == L"10" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 3, 2) == L"00" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 4, 2) == L"0" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 5, 2) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 0, 3) == L" 10" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 1, 3) == L" 10" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 2, 3) == L"100" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 3, 3) == L"00" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 4, 3) == L"0" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 5, 3) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 0, 4) == L" 100" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 1, 4) == L" 100" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 2, 4) == L"100" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 3, 4) == L"00" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 4, 4) == L"0" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"\v\t 100", 5, 4) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 0, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 1, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 2, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 3, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 4, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 5, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 0, 1) == L"0" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 1, 1) == L"0" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 2, 1) == L"1" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 3, 1) == L"2" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 4, 1) == L"3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 5, 1) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 0, 2) == L"01" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 1, 2) == L"01" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 2, 2) == L"12" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 3, 2) == L"23" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 4, 2) == L"3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 5, 2) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 0, 3) == L"012" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 1, 3) == L"012" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 2, 3) == L"123" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 3, 3) == L"23" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 4, 3) == L"3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 5, 3) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 0, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 1, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 2, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 3, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 4, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 5, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 6, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 7, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 8, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 9, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 0, 1) == L"›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 1, 1) == L"›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 2, 1) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 3, 1) == L"›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 4, 1) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 5, 1) == L"›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 6, 1) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 7, 1) == L"›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 8, 1) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 9, 1) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 0, 2) == L"0" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 1, 2) == L"0" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 2, 2) == L"‹›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 3, 2) == L"1" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 4, 2) == L"‹›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 5, 2) == L"2" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 6, 2) == L"‹›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 7, 2) == L"3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 8, 2) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 9, 2) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 0, 3) == L"0›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 1, 3) == L"0›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 2, 3) == L"‹1" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 3, 3) == L"1›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 4, 3) == L"‹2" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 5, 3) == L"2›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 6, 3) == L"‹3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 7, 3) == L"3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 8, 3) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 9, 3) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 0, 4) == L"01" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 1, 4) == L"01" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 2, 4) == L"‹1›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 3, 4) == L"12" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 4, 4) == L"‹2›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 5, 4) == L"23" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 6, 4) == L"‹3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 7, 4) == L"3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 8, 4) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 9, 4) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 0, 5) == L"01›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 1, 5) == L"01›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 2, 5) == L"‹12" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 3, 5) == L"12›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 4, 5) == L"‹23" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 5, 5) == L"23" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 6, 5) == L"‹3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 7, 5) == L"3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 8, 5) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 9, 5) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 0, 6) == L"012" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 1, 6) == L"012" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 2, 6) == L"‹12›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 3, 6) == L"123" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 4, 6) == L"‹23" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 5, 6) == L"23" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 6, 6) == L"‹3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 7, 6) == L"3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 8, 6) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 9, 6) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 0, 7) == L"012›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 1, 7) == L"012›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 2, 7) == L"‹123" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 3, 7) == L"123" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 4, 7) == L"‹23" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 5, 7) == L"23" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 6, 7) == L"‹3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 7, 7) == L"3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 8, 7) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 9, 7) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 0, 8) == L"0123" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 1, 8) == L"0123" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 2, 8) == L"‹123" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 3, 8) == L"123" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 4, 8) == L"‹23" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 5, 8) == L"23" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 6, 8) == L"‹3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 7, 8) == L"3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 8, 8) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"0123", 9, 8) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 1) == L"›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 1) == L"›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 1) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 1) == L"›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 1) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 1) == L" " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 1) == L"o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 1) == L"n" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 1) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 1) == L" " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 1) == L"›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 1) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 1) == L"›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 1) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 1) == L"›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 1) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 1) == L" " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 1) == L"m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 1) == L"o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 1) == L"r" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 1) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 1) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 2) == L"你" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 2) == L"你" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 2) == L"‹›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 2) == L"好" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 2) == L"‹ " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 2) == L" o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 2) == L"on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 2) == L"ne" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 2) == L"e " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 2) == L" ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 2) == L"C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 2) == L"‹›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 2) == L"U" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 2) == L"‹›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 2) == L"T" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 2) == L"‹ " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 2) == L" m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 2) == L"mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 2) == L"or" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 2) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 2) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 2) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 3) == L"你›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 3) == L"你›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 3) == L"‹好" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 3) == L"好 " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 3) == L"‹ o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 3) == L" on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 3) == L"one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 3) == L"ne " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 3) == L"e ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 3) == L" C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 3) == L"C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 3) == L"‹U" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 3) == L"U›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 3) == L"‹T" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 3) == L"T " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 3) == L"‹ m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 3) == L" mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 3) == L"mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 3) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 3) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 3) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 3) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 4) == L"你好" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 4) == L"你好" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 4) == L"‹好 " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 4) == L"好 o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 4) == L"‹ on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 4) == L" one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 4) == L"one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 4) == L"ne ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 4) == L"e C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 4) == L" C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 4) == L"CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 4) == L"‹U›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 4) == L"UT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 4) == L"‹T " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 4) == L"T m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 4) == L"‹ mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 4) == L" mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 4) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 4) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 4) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 4) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 4) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 5) == L"你好 " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 5) == L"你好 " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 5) == L"‹好 o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 5) == L"好 on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 5) == L"‹ one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 5) == L" one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 5) == L"one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 5) == L"ne C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 5) == L"e C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 5) == L" CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 5) == L"CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 5) == L"‹UT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 5) == L"UT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 5) == L"‹T m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 5) == L"T mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 5) == L"‹ mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 5) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 5) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 5) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 5) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 5) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 5) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 6) == L"你好 o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 6) == L"你好 o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 6) == L"‹好 on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 6) == L"好 one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 6) == L"‹ one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 6) == L" one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 6) == L"one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 6) == L"ne C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 6) == L"e CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 6) == L" CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 6) == L"CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 6) == L"‹UT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 6) == L"UT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 6) == L"‹T mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 6) == L"T mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 6) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 6) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 6) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 6) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 6) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 6) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 6) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 7) == L"你好 on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 7) == L"你好 on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 7) == L"‹好 one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 7) == L"好 one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 7) == L"‹ one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 7) == L" one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 7) == L"one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 7) == L"ne CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 7) == L"e CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 7) == L" CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 7) == L"CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 7) == L"‹UT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 7) == L"UT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 7) == L"‹T mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 7) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 7) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 7) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 7) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 7) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 7) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 7) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 7) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 8) == L"你好 one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 8) == L"你好 one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 8) == L"‹好 one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 8) == L"好 one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 8) == L"‹ one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 8) == L" one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 8) == L"one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 8) == L"ne CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 8) == L"e CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 8) == L" CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 8) == L"CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 8) == L"‹UT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 8) == L"UT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 8) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 8) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 8) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 8) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 8) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 8) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 8) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 8) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 8) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 9) == L"你好 one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 9) == L"你好 one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 9) == L"‹好 one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 9) == L"好 one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 9) == L"‹ one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 9) == L" one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 9) == L"one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 9) == L"ne CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 9) == L"e CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 9) == L" CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 9) == L"CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 9) == L"‹UT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 9) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 9) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 9) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 9) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 9) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 9) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 9) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 9) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 9) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 9) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 10) == L"你好 one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 10) == L"你好 one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 10) == L"‹好 one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 10) == L"好 one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 10) == L"‹ one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 10) == L" one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 10) == L"one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 10) == L"ne CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 10) == L"e CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 10) == L" CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 10) == L"CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 10) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 10) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 10) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 10) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 10) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 10) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 10) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 10) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 10) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 10) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 10) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 11) == L"你好 one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 11) == L"你好 one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 11) == L"‹好 one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 11) == L"好 one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 11) == L"‹ one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 11) == L" one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 11) == L"one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 11) == L"ne CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 11) == L"e CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 11) == L" CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 11) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 11) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 11) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 11) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 11) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 11) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 11) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 11) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 11) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 11) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 11) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 11) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 12) == L"你好 one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 12) == L"你好 one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 12) == L"‹好 one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 12) == L"好 one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 12) == L"‹ one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 12) == L" one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 12) == L"one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 12) == L"ne CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 12) == L"e CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 12) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 12) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 12) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 12) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 12) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 12) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 12) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 12) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 12) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 12) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 12) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 12) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 12) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 13) == L"你好 one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 13) == L"你好 one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 13) == L"‹好 one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 13) == L"好 one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 13) == L"‹ one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 13) == L" one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 13) == L"one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 13) == L"ne CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 13) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 13) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 13) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 13) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 13) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 13) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 13) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 13) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 13) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 13) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 13) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 13) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 13) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 13) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 14) == L"你好 one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 14) == L"你好 one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 14) == L"‹好 one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 14) == L"好 one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 14) == L"‹ one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 14) == L" one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 14) == L"one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 14) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 14) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 14) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 14) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 14) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 14) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 14) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 14) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 14) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 14) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 14) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 14) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 14) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 14) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 14) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 15) == L"你好 one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 15) == L"你好 one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 15) == L"‹好 one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 15) == L"好 one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 15) == L"‹ one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 15) == L" one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 15) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 15) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 15) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 15) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 15) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 15) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 15) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 15) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 15) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 15) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 15) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 15) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 15) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 15) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 15) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 15) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 16) == L"你好 one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 16) == L"你好 one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 16) == L"‹好 one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 16) == L"好 one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 16) == L"‹ one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 16) == L" one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 16) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 16) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 16) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 16) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 16) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 16) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 16) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 16) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 16) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 16) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 16) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 16) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 16) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 16) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 16) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 16) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 17) == L"你好 one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 17) == L"你好 one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 17) == L"‹好 one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 17) == L"好 one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 17) == L"‹ one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 17) == L" one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 17) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 17) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 17) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 17) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 17) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 17) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 17) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 17) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 17) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 17) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 17) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 17) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 17) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 17) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 17) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 17) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 18) == L"你好 one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 18) == L"你好 one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 18) == L"‹好 one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 18) == L"好 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 18) == L"‹ one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 18) == L" one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 18) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 18) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 18) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 18) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 18) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 18) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 18) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 18) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 18) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 18) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 18) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 18) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 18) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 18) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 18) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 18) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 19) == L"你好 one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 19) == L"你好 one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 19) == L"‹好 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 19) == L"好 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 19) == L"‹ one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 19) == L" one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 19) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 19) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 19) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 19) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 19) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 19) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 19) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 19) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 19) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 19) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 19) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 19) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 19) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 19) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 19) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 19) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 0, 20) == L"你好 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 1, 20) == L"你好 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 2, 20) == L"‹好 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 3, 20) == L"好 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 4, 20) == L"‹ one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 5, 20) == L" one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 6, 20) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 7, 20) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 8, 20) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 9, 20) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 10, 20) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 11, 20) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 12, 20) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 13, 20) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 14, 20) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 15, 20) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 16, 20) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 17, 20) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 18, 20) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 19, 20) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 20, 20) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"你好 one CUT more", 21, 20) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 1) == L"1" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 1) == L"1" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 1) == L"2" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 1) == L"3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 1) == L"4" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 1) == L"5" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 1) == L"6" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 1) == L"7" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 1) == L" " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 1) == L"o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 1) == L"n" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 1) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 1) == L" " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 1) == L"›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 1) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 1) == L"›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 1) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 1) == L"›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 1) == L"‹" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 1) == L" " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 1) == L"m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 1) == L"o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 1) == L"r" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 1) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 1) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 2) == L"12" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 2) == L"12" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 2) == L"23" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 2) == L"34" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 2) == L"45" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 2) == L"56" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 2) == L"67" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 2) == L"7 " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 2) == L" o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 2) == L"on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 2) == L"ne" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 2) == L"e " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 2) == L" ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 2) == L"C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 2) == L"‹›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 2) == L"U" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 2) == L"‹›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 2) == L"T" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 2) == L"‹ " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 2) == L" m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 2) == L"mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 2) == L"or" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 2) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 2) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 2) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 3) == L"123" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 3) == L"123" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 3) == L"234" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 3) == L"345" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 3) == L"456" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 3) == L"567" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 3) == L"67 " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 3) == L"7 o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 3) == L" on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 3) == L"one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 3) == L"ne " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 3) == L"e ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 3) == L" C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 3) == L"C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 3) == L"‹U" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 3) == L"U›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 3) == L"‹T" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 3) == L"T " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 3) == L"‹ m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 3) == L" mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 3) == L"mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 3) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 3) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 3) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 3) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 4) == L"1234" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 4) == L"1234" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 4) == L"2345" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 4) == L"3456" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 4) == L"4567" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 4) == L"567 " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 4) == L"67 o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 4) == L"7 on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 4) == L" one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 4) == L"one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 4) == L"ne ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 4) == L"e C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 4) == L" C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 4) == L"CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 4) == L"‹U›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 4) == L"UT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 4) == L"‹T " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 4) == L"T m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 4) == L"‹ mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 4) == L" mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 4) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 4) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 4) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 4) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 4) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 5) == L"12345" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 5) == L"12345" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 5) == L"23456" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 5) == L"34567" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 5) == L"4567 " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 5) == L"567 o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 5) == L"67 on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 5) == L"7 one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 5) == L" one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 5) == L"one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 5) == L"ne C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 5) == L"e C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 5) == L" CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 5) == L"CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 5) == L"‹UT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 5) == L"UT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 5) == L"‹T m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 5) == L"T mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 5) == L"‹ mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 5) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 5) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 5) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 5) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 5) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 5) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 6) == L"123456" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 6) == L"123456" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 6) == L"234567" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 6) == L"34567 " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 6) == L"4567 o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 6) == L"567 on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 6) == L"67 one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 6) == L"7 one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 6) == L" one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 6) == L"one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 6) == L"ne C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 6) == L"e CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 6) == L" CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 6) == L"CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 6) == L"‹UT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 6) == L"UT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 6) == L"‹T mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 6) == L"T mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 6) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 6) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 6) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 6) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 6) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 6) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 6) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 7) == L"1234567" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 7) == L"1234567" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 7) == L"234567 " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 7) == L"34567 o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 7) == L"4567 on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 7) == L"567 one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 7) == L"67 one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 7) == L"7 one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 7) == L" one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 7) == L"one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 7) == L"ne CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 7) == L"e CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 7) == L" CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 7) == L"CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 7) == L"‹UT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 7) == L"UT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 7) == L"‹T mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 7) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 7) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 7) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 7) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 7) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 7) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 7) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 7) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 8) == L"1234567 " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 8) == L"1234567 " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 8) == L"234567 o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 8) == L"34567 on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 8) == L"4567 one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 8) == L"567 one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 8) == L"67 one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 8) == L"7 one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 8) == L" one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 8) == L"one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 8) == L"ne CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 8) == L"e CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 8) == L" CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 8) == L"CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 8) == L"‹UT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 8) == L"UT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 8) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 8) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 8) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 8) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 8) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 8) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 8) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 8) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 8) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 9) == L"1234567 o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 9) == L"1234567 o" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 9) == L"234567 on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 9) == L"34567 one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 9) == L"4567 one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 9) == L"567 one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 9) == L"67 one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 9) == L"7 one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 9) == L" one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 9) == L"one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 9) == L"ne CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 9) == L"e CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 9) == L" CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 9) == L"CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 9) == L"‹UT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 9) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 9) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 9) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 9) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 9) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 9) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 9) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 9) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 9) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 9) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 10) == L"1234567 on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 10) == L"1234567 on" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 10) == L"234567 one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 10) == L"34567 one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 10) == L"4567 one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 10) == L"567 one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 10) == L"67 one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 10) == L"7 one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 10) == L" one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 10) == L"one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 10) == L"ne CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 10) == L"e CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 10) == L" CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 10) == L"CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 10) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 10) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 10) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 10) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 10) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 10) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 10) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 10) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 10) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 10) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 10) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 11) == L"1234567 one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 11) == L"1234567 one" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 11) == L"234567 one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 11) == L"34567 one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 11) == L"4567 one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 11) == L"567 one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 11) == L"67 one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 11) == L"7 one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 11) == L" one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 11) == L"one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 11) == L"ne CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 11) == L"e CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 11) == L" CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 11) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 11) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 11) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 11) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 11) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 11) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 11) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 11) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 11) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 11) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 11) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 11) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 12) == L"1234567 one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 12) == L"1234567 one " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 12) == L"234567 one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 12) == L"34567 one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 12) == L"4567 one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 12) == L"567 one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 12) == L"67 one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 12) == L"7 one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 12) == L" one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 12) == L"one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 12) == L"ne CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 12) == L"e CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 12) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 12) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 12) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 12) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 12) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 12) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 12) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 12) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 12) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 12) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 12) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 12) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 12) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 13) == L"1234567 one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 13) == L"1234567 one ›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 13) == L"234567 one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 13) == L"34567 one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 13) == L"4567 one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 13) == L"567 one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 13) == L"67 one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 13) == L"7 one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 13) == L" one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 13) == L"one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 13) == L"ne CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 13) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 13) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 13) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 13) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 13) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 13) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 13) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 13) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 13) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 13) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 13) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 13) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 13) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 13) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 14) == L"1234567 one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 14) == L"1234567 one C" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 14) == L"234567 one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 14) == L"34567 one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 14) == L"4567 one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 14) == L"567 one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 14) == L"67 one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 14) == L"7 one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 14) == L" one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 14) == L"one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 14) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 14) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 14) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 14) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 14) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 14) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 14) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 14) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 14) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 14) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 14) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 14) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 14) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 14) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 14) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 15) == L"1234567 one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 15) == L"1234567 one C›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 15) == L"234567 one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 15) == L"34567 one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 15) == L"4567 one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 15) == L"567 one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 15) == L"67 one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 15) == L"7 one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 15) == L" one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 15) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 15) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 15) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 15) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 15) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 15) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 15) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 15) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 15) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 15) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 15) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 15) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 15) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 15) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 15) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 15) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 16) == L"1234567 one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 16) == L"1234567 one CU" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 16) == L"234567 one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 16) == L"34567 one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 16) == L"4567 one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 16) == L"567 one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 16) == L"67 one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 16) == L"7 one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 16) == L" one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 16) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 16) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 16) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 16) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 16) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 16) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 16) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 16) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 16) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 16) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 16) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 16) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 16) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 16) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 16) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 16) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 17) == L"1234567 one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 17) == L"1234567 one CU›" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 17) == L"234567 one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 17) == L"34567 one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 17) == L"4567 one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 17) == L"567 one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 17) == L"67 one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 17) == L"7 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 17) == L" one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 17) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 17) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 17) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 17) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 17) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 17) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 17) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 17) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 17) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 17) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 17) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 17) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 17) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 17) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 17) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 17) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 18) == L"1234567 one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 18) == L"1234567 one CUT" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 18) == L"234567 one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 18) == L"34567 one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 18) == L"4567 one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 18) == L"567 one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 18) == L"67 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 18) == L"7 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 18) == L" one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 18) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 18) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 18) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 18) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 18) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 18) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 18) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 18) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 18) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 18) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 18) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 18) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 18) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 18) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 18) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 18) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 19) == L"1234567 one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 19) == L"1234567 one CUT " ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 19) == L"234567 one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 19) == L"34567 one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 19) == L"4567 one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 19) == L"567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 19) == L"67 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 19) == L"7 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 19) == L" one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 19) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 19) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 19) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 19) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 19) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 19) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 19) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 19) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 19) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 19) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 19) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 19) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 19) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 19) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 19) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 19) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 20) == L"1234567 one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 20) == L"1234567 one CUT m" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 20) == L"234567 one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 20) == L"34567 one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 20) == L"4567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 20) == L"567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 20) == L"67 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 20) == L"7 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 20) == L" one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 20) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 20) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 20) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 20) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 20) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 20) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 20) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 20) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 20) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 20) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 20) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 20) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 20) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 20) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 20) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 20) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 21) == L"1234567 one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 21) == L"1234567 one CUT mo" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 21) == L"234567 one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 21) == L"34567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 21) == L"4567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 21) == L"567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 21) == L"67 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 21) == L"7 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 21) == L" one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 21) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 21) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 21) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 21) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 21) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 21) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 21) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 21) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 21) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 21) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 21) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 21) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 21) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 21) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 21) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 21) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 22) == L"1234567 one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 22) == L"1234567 one CUT mor" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 22) == L"234567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 22) == L"34567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 22) == L"4567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 22) == L"567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 22) == L"67 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 22) == L"7 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 22) == L" one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 22) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 22) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 22) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 22) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 22) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 22) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 22) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 22) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 22) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 22) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 22) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 22) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 22) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 22) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 22) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 22) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 0, 23) == L"1234567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 1, 23) == L"1234567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 2, 23) == L"234567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 3, 23) == L"34567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 4, 23) == L"4567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 5, 23) == L"567 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 6, 23) == L"67 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 7, 23) == L"7 one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 8, 23) == L" one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 9, 23) == L"one CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 10, 23) == L"ne CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 11, 23) == L"e CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 12, 23) == L" CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 13, 23) == L"CUT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 14, 23) == L"‹UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 15, 23) == L"UT more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 16, 23) == L"‹T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 17, 23) == L"T more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 18, 23) == L"‹ more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 19, 23) == L" more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 20, 23) == L"more" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 21, 23) == L"ore" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 22, 23) == L"re" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 23, 23) == L"e" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"1234567 one CUT more", 24, 23) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 0, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 1, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 2, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 3, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 4, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 0, 1) == L"o\U0000031b\U00000323" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 1, 1) == L"o\U0000031b\U00000323" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 2, 1) == L"=" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 3, 1) == L"\U00001ee3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 4, 1) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 0, 2) == L"o\U0000031b\U00000323=" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 1, 2) == L"o\U0000031b\U00000323=" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 2, 2) == L"=\U00001ee3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 3, 2) == L"\U00001ee3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 4, 2) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 0, 3) == L"o\U0000031b\U00000323=\U00001ee3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 1, 3) == L"o\U0000031b\U00000323=\U00001ee3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 2, 3) == L"=\U00001ee3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 3, 3) == L"\U00001ee3" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"o\U0000031b\U00000323=\U00001ee3", 4, 3) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 0, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 1, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 2, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 3, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 4, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 5, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 6, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 7, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 8, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 9, 0) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 0, 1) == L"S" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 1, 1) == L"S" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 2, 1) == L"T" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 3, 1) == L"A" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 4, 1) == L"R" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 5, 1) == L"G" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 6, 1) == L"Λ̊" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 7, 1) == L"T" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 8, 1) == L"E" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 9, 1) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 0, 2) == L"ST" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 1, 2) == L"ST" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 2, 2) == L"TA" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 3, 2) == L"AR" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 4, 2) == L"RG" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 5, 2) == L"GΛ̊" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 6, 2) == L"Λ̊T" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 7, 2) == L"TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 8, 2) == L"E" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 9, 2) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 0, 3) == L"STA" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 1, 3) == L"STA" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 2, 3) == L"TAR" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 3, 3) == L"ARG" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 4, 3) == L"RGΛ̊" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 5, 3) == L"GΛ̊T" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 6, 3) == L"Λ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 7, 3) == L"TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 8, 3) == L"E" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 9, 3) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 0, 4) == L"STAR" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 1, 4) == L"STAR" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 2, 4) == L"TARG" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 3, 4) == L"ARGΛ̊" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 4, 4) == L"RGΛ̊T" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 5, 4) == L"GΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 6, 4) == L"Λ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 7, 4) == L"TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 8, 4) == L"E" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 9, 4) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 0, 5) == L"STARG" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 1, 5) == L"STARG" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 2, 5) == L"TARGΛ̊" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 3, 5) == L"ARGΛ̊T" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 4, 5) == L"RGΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 5, 5) == L"GΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 6, 5) == L"Λ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 7, 5) == L"TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 8, 5) == L"E" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 9, 5) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 0, 6) == L"STARGΛ̊" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 1, 6) == L"STARGΛ̊" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 2, 6) == L"TARGΛ̊T" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 3, 6) == L"ARGΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 4, 6) == L"RGΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 5, 6) == L"GΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 6, 6) == L"Λ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 7, 6) == L"TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 8, 6) == L"E" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 9, 6) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 0, 7) == L"STARGΛ̊T" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 1, 7) == L"STARGΛ̊T" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 2, 7) == L"TARGΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 3, 7) == L"ARGΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 4, 7) == L"RGΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 5, 7) == L"GΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 6, 7) == L"Λ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 7, 7) == L"TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 8, 7) == L"E" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 9, 7) == L"" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 0, 8) == L"STARGΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 1, 8) == L"STARGΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 2, 8) == L"TARGΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 3, 8) == L"ARGΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 4, 8) == L"RGΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 5, 8) == L"GΛ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 6, 8) == L"Λ̊TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 7, 8) == L"TE" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 8, 8) == L"E" ); CPPUNIT_ASSERT ( finalcut::getColumnSubString(L"STARGΛ̊TE", 9, 8) == L"" ); } //---------------------------------------------------------------------- void FTermFunctionsTest::combiningCharacterTest() { // Leading zero-width characters std::wstring combining = L"\U00000323\U00000300\U0000ff2f\n"; // [] [] O [NL] CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 0) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 1) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 2) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 3) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 0) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 1) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 2) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 3) == 1 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 0) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 1) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 2) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 3) == 2 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 4) == 3 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 0) == 2 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 1) == 2 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 2) == 3 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 3) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 4) == NOT_FOUND ); // Characters with separate and with combined diacritical marks combining = L"u\U00000300=\U000000f9"; // u ` = ù CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 0) == 2 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 1) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 2) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 3) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 4) == -1 ); // Position is outside the string CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 0) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 1) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 2) == 2 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 3) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 4) == -1 ); // Position is outside the string CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 0) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 1) == 0 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 2) == 0 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 3) == 2 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 4) == 3 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 0) == 2 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 1) == 2 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 2) == 3 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 3) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 4) == NOT_FOUND ); combining = L"o\U0000031b\U00000323=\U00001ee3"; // o ‍̛ ‍̣ = ợ CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 0) == 3 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 1) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 2) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 3) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 4) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 0) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 1) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 2) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 3) == 3 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 4) == 1 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 0) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 1) == 0 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 2) == 0 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 3) == 0 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 4) == 3 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 5) == 4 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 0) == 3 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 1) == 3 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 2) == 3 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 3) == 4 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 4) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 5) == NOT_FOUND ); // Many combination characters combining = L"v" \ L"\U00000300\U0000032e\U00000368" \ L"\U00000364\U00000348\U0000034b"; // v ̀ ̮ ͨ ͤ ͈ ͋ CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 0) == 7 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 1) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 2) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 3) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 4) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 5) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 6) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 0) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 1) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 2) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 3) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 4) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 5) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 6) == -1 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 0) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 1) == 0 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 2) == 0 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 3) == 0 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 4) == 0 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 5) == 0 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 6) == 0 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 7) == 0 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 0) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 1) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 2) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 3) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 4) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 5) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 6) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 7) == NOT_FOUND ); // Trailing uncombined zero-width characters combining = L"a\t\U00000300\U00000323"; // a [Tab] [] [] CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 0) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 2) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 3) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 0) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 2) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 3) == -1 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 0) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 1) == 0 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 2) == 1 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 3) == 1 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 4) == 1 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 0) == 1 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 1) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 2) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 3) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 4) == NOT_FOUND ); // Thai (ISO 10646-1 - UCS implementation level 2) combining = L"๏ แผ่นดินฮั่นเสื่อมโทรมแสนสังเวช"; CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 0) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 2) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 3) == 2 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 4) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 5) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 6) == 2 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 7) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 8) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 9) == 3 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 10) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 11) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 12) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 13) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 14) == 3 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 15) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 16) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 17) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 18) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 19) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 20) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 21) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 22) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 23) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 24) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 25) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 26) == 2 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 27) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 28) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 29) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 30) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 31) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 0) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 2) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 3) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 4) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 5) == 2 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 6) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 7) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 8) == 2 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 9) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 10) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 11) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 12) == 3 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 13) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 14) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 15) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 16) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 17) == 3 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 18) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 19) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 20) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 21) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 22) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 23) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 24) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 25) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 26) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 27) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 28) == 2 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 29) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 30) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 31) == 1 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 0) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 1) == 0 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 2) == 1 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 3) == 2 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 4) == 3 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 5) == 3 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 6) == 5 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 7) == 6 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 8) == 6 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 9) == 8 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 10) == 9 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 11) == 9 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 12) == 9 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 13) == 12 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 14) == 13 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 15) == 14 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 16) == 14 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 17) == 14 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 18) == 17 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 19) == 18 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 20) == 19 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 21) == 20 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 22) == 21 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 23) == 22 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 24) == 23 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 25) == 24 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 26) == 25 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 27) == 26 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 28) == 26 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 29) == 28 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 30) == 29 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 31) == 30 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 32) == 31 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 0) == 1 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 1) == 2 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 2) == 3 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 3) == 5 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 4) == 5 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 5) == 6 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 6) == 8 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 7) == 8 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 8) == 9 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 9) == 12 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 10) == 12 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 11) == 12 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 12) == 13 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 13) == 14 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 14) == 17 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 15) == 17 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 16) == 17 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 17) == 18 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 18) == 19 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 19) == 20 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 20) == 21 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 21) == 22 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 22) == 23 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 23) == 24 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 24) == 25 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 25) == 26 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 26) == 28 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 27) == 28 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 28) == 29 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 29) == 30 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 30) == 31 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 31) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 32) == NOT_FOUND ); // Devanagari script (ISO 10646-1 - UCS implementation level 2) combining = L"पन्ह पन्ह त्र र्च कृकृ ड्ड न्ह"; CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 0) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 1) == 2 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 2) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 3) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 4) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 5) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 6) == 2 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 7) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 8) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 9) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 10) == 2 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 11) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 12) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 13) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 14) == 2 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 15) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 16) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 17) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 18) == 2 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 19) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 20) == 2 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 21) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 22) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 23) == 2 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 24) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 25) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 26) == 1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 27) == 2 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 28) == -1 ); CPPUNIT_ASSERT ( finalcut::getCharLength(combining, 29) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 0) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 1) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 2) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 3) == 2 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 4) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 5) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 6) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 7) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 8) == 2 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 9) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 10) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 11) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 12) == 2 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 13) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 14) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 15) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 16) == 2 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 17) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 18) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 19) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 20) == 2 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 21) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 22) == 2 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 23) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 24) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 25) == 2 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 26) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 27) == 1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 28) == -1 ); CPPUNIT_ASSERT ( finalcut::getPrevCharLength(combining, 29) == 2 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 0) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 1) == 0 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 2) == 1 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 3) == 1 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 4) == 3 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 5) == 4 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 6) == 5 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 7) == 6 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 8) == 6 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 9) == 8 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 10) == 9 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 11) == 10 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 12) == 10 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 13) == 12 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 14) == 13 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 15) == 14 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 16) == 14 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 17) == 16 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 18) == 17 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 19) == 18 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 20) == 18 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 21) == 20 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 22) == 20 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 23) == 22 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 24) == 23 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 25) == 23 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 26) == 25 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 27) == 26 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 28) == 27 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 29) == 27 ); CPPUNIT_ASSERT ( finalcut::searchLeftCharBegin(combining, 30) == 29 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 0) == 1 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 1) == 3 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 2) == 3 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 3) == 4 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 4) == 5 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 5) == 6 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 6) == 8 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 7) == 8 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 8) == 9 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 9) == 10 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 10) == 12 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 11) == 12 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 12) == 13 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 13) == 14 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 14) == 16 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 15) == 16 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 16) == 17 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 17) == 18 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 18) == 20 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 19) == 20 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 20) == 22 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 21) == 22 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 22) == 23 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 23) == 25 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 24) == 25 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 25) == 26 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 26) == 27 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 27) == 29 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 28) == 29 ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 29) == NOT_FOUND ); CPPUNIT_ASSERT ( finalcut::searchRightCharBegin(combining, 30) == NOT_FOUND ); } //---------------------------------------------------------------------- void FTermFunctionsTest::readCursorPosTest() { finalcut::FTermData& data = *finalcut::FTerm::getFTermData(); finalcut::FTermDetection detect; data.setTermType("xterm"); detect.setTerminalDetection(true); pid_t pid = forkConEmu(); if ( isConEmuChildProcess(pid) ) { const finalcut::FPoint cursor_pos = finalcut::readCursorPos(); CPPUNIT_ASSERT ( cursor_pos.getX() == 80 ); CPPUNIT_ASSERT ( cursor_pos.getY() == 25 ); closeConEmuStdStreams(); exit(EXIT_SUCCESS); } else // Parent { // Start the terminal emulation startConEmuTerminal (ConEmu::console::xterm); if ( waitpid(pid, 0, WUNTRACED) != pid ) std::cerr << "waitpid error" << std::endl; } } // Put the test suite in the registry CPPUNIT_TEST_SUITE_REGISTRATION (FTermFunctionsTest); // The general unit test main part #include