Example #1
0
TestResults* myersDiffbyLinebyChar ( const std::string & student_file, const std::string & expected_file) {
	vectorOfLines text_a = stringToLines( student_file );
	vectorOfLines text_b = stringToLines( expected_file );
	Difference* diff = ses( &text_a, &text_b, true );
	diff->type = ByLineByChar;
	return diff;

}
Example #2
0
TestResults* myersDiffbyLinebyCharExtraStudentOutputOk ( const std::string & student_file, const std::string & expected_file) {
#if 0
  //from nowhite
	vectorOfWords text_a = stringToWords( student_file );
	vectorOfWords text_b = stringToWords( expected_file );
	Difference* diff = ses( &text_a, &text_b, true, extraStudentOutputOk );
	diff->type = ByLineByWord;
	return diff;
#else
	std::cout << "MYERS DIFF EXTRA STUDENT OUTPUT" << std::endl;
	vectorOfLines text_a = stringToLines( student_file );
	vectorOfLines text_b = stringToLines( expected_file );
	bool extraStudentOutputOk = true;
	Difference* diff = ses( &text_a, &text_b, true, extraStudentOutputOk );
	diff->type = ByLineByChar;
	std::cout << "end of MYERS DIFF EXTRA STUDENT OUTPUT" << std::endl;
	return diff;
#endif
}
Example #3
0
void ofxTextLabel_<T>::rebuild()
{
    stringToLines(*_font, _text, _drawBounds.width, _textLines, _textBounds, _lineSpacing);
    _bDirty = false;
}
Example #4
0
void ofxTextLabel_<T>::drawString(T& font, const string& str, const ofRectangle& drawBounds, vector<string>& textLines, ofRectangle& textBounds, float lineSpacing, ofAlignHorz alignHorz, ofAlignVert alignVert)
{
    stringToLines(font, str, drawBounds.width, textLines, textBounds, lineSpacing);
    drawLines(font, textLines, textBounds, drawBounds, lineSpacing, alignHorz, alignVert);
}