- * Gets the line, word, and character indices for a given text and a given position and checks the results with the given indices.
+ * Gets the paragraph, word, and character indices for a given text and a given position and checks the results with the given indices.
*
* If the test fails it prints a short description and the line where this function was called.
*
* @param description Short description of the experiment.
* @param input The input text.
* @param position Global position of the character. i.e in a text with with 1000 characters, position could be any value from 0 to 1000.
*
* If the test fails it prints a short description and the line where this function was called.
*
* @param description Short description of the experiment.
* @param input The input text.
* @param position Global position of the character. i.e in a text with with 1000 characters, position could be any value from 0 to 1000.
- * @param resultLineIndex Index to the line where the character is located.
- * @param resultWordIndex Index to the word within the line where the character is located.
+ * @param resultParagraphIndex Index to the paragraph where the character is located.
+ * @param resultWordIndex Index to the word within the paragraph where the character is located.
* @param resultCharacterIndex Index to the character within the word where the character is located.
* @param location Where this function has been called.
*
* @param resultCharacterIndex Index to the character within the word where the character is located.
* @param location Where this function has been called.
*
bool TestGetIndicesFromGlobalCharacterIndex( const std::string& description,
const std::string& input,
const std::size_t position,
bool TestGetIndicesFromGlobalCharacterIndex( const std::string& description,
const std::string& input,
const std::size_t position,
const std::size_t resultWordIndex,
const std::size_t resultCharacterIndex,
const char* location )
const std::size_t resultWordIndex,
const std::size_t resultCharacterIndex,
const char* location )
std::string( "text te<font size='30'>xt text text text\n</font>"
"text text טק<font size='30'>סט טקסט </font>text\n"
"text te<font size='30'>xt text text</font> text\n"
std::string( "text te<font size='30'>xt text text text\n</font>"
"text text טק<font size='30'>סט טקסט </font>text\n"
"text te<font size='30'>xt text text</font> text\n"
- if( !TestGetIndicesFromGlobalCharacterIndex( test.description, test.input, test.position, test.lineIndex, test.wordIndex, test.characterIndex, TEST_LOCATION ) )
+ if( !TestGetIndicesFromGlobalCharacterIndex( test.description, test.input, test.position, test.paragraphIndex, test.wordIndex, test.characterIndex, TEST_LOCATION ) )