doxygen translation tests updated for tags 'anchor' and 'ref'

This commit is contained in:
Marko Klopcic 2013-03-17 21:42:22 +01:00
commit 02d0acfbb3
3 changed files with 30 additions and 6 deletions

View file

@ -56,10 +56,18 @@ public class CommentParser {
actualStr = actualStr.replace(" ", "");
actualStr = actualStr.replaceAll("\t", "");
actualStr = actualStr.replace("\n", "");
// Removing of <br> is temporary solution, since adding of
// <br> tag requires changes in all tests. However, <br>
// tag should be added more selectively and when this is
// implemented, tests should be updated.
actualStr = actualStr.replace("<br>", "");
if (wantedStr != null) {
wantedStr = wantedStr.replace(" ", "");
wantedStr = wantedStr.replace("\t", "");
wantedStr = wantedStr.replace("\n", "");
wantedStr = wantedStr.replace("<br>", "");
}
/* The following lines replace multiple whitespaces with a single one.
Although this would be more exact testing, it would also require
@ -92,7 +100,7 @@ public class CommentParser {
// write translated string to file
BufferedWriter gotFile = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(gotFileName)));
gotFile.write(e.getValue());
gotFile.write(e.getValue().replace("<br>", ""));
gotFile.close();
} catch (IOException ex) {
System.out.println("Error when writing output to file: " + ex);

View file

@ -27,7 +27,8 @@ public class doxygen_translate_all_tags_runme {
HashMap<String, String> wantedComments = new HashMap<String, String>();
wantedComments.put("doxygen_translate_all_tags.doxygen_translate_all_tags.func01(int)",
" <i>Hello </i>\n\n\n\n\n\n" +
" <i>Hello </i>\n\n\n" +
" <a id=\"theAnchor\"></a>\n\n\n" +
" <li>some list item</li>\n\n" +
" This is attention!\n" +
" You were warned!\n" +
@ -113,9 +114,9 @@ public class doxygen_translate_all_tags_runme {
wantedComments.put("doxygen_translate_all_tags.doxygen_translate_all_tags.func08(int)",
"<a id=\"someAnchor\"></a>\n" +
"Text after anchor.\n" +
"<a href="someAnchor">Anchor description</a>\n" +
"<a href="someAnchor">someAnchor</a>\n" +
"<a href="someAnchor">someAnchor</a>\n" +
"<a href=\"#someAnchor\">Anchor description</a>\n" +
"<a href=\"#someAnchor\">someAnchor</a> not quoted text is not part of ref tag\n" +
"<a href=\"#someAnchor\">someAnchor</a>\n" +
" Remarks: Some remark text \n" +
" Remarks: Another remarks section \n" +
" @return Whatever \n" +