import doxygen_translate.*; import com.sun.javadoc.*; import java.util.HashMap; public class doxygen_translate_runme { static { try { System.loadLibrary("doxygen_translate"); } catch (UnsatisfiedLinkError e) { System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e); System.exit(1); } } public static void main(String argv[]) { /* Here we are using internal javadoc tool, it accepts the name of the class as paramterer, and calls the start() method of that class with parsed information. */ commentParser parser = new commentParser(); com.sun.tools.javadoc.Main.execute("doxygen_translate runtime test", "commentParser", new String[]{"-quiet", "doxygen_translate"}); HashMap wantedComments = new HashMap(); wantedComments.put("doxygen_translate.doxygen_translate.function(int, float)", " Hello \n" + " \n" + "
  • some list item
  • \n" + " \n" + " @author lots of them \n" + " \n" + " @author Zubr \n" + " \n" + " boldword \n" + " \n" + " codeword \n" + " \n" + " citationword \n" + " \n" + " {@code some test code }\n" + " \n" + " Conditional comment: SOMECONDITION \n" + " Some conditional comment \n" + " End of conditional comment.\n" + " \n" + " Copyright: some copyright \n" + " \n" + " @deprecated Now use another function \n" + " \n" + " italicword \n" + " \n" + " @ example someFile.txt\n" + " Some details on using the example\n" + " \n" + " @exception SuperError \n" + " \n" + " If: ANOTHERCONDITION {\n" + " First part of comment \n" + " If: SECONDCONDITION {\n" + " Nested condition text}\n" + " Else if: THIRDCONDITION {\n" + " The third condition text}\n" + " Else: {The last text block}}\n" + " \n" + " Else: {Second part of comment \n" + " If: CONDITION {\n" + " Second part extended}}\n" + " \n" + " \n" + " \n" + " If not: SOMECONDITION {\n" + " This is printed if not}\n" + " \n" + " \n" + " \"Hello,\n" + " \n" + " \n" + " \n" + " {@link someMember Some description follows }\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " Note: Here \n" + " is the note! \n" + " \n" + " This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.\n" + " \n" + " someword \n" + " \n" + " @package superPackage \n" + " \n" + "

    \n" + " The paragraph text. \n" + " Maybe even multiline

    \n" + " \n" + " @param a the first param \n" + " \n" + " Remarks: Some remark text \n" + " \n" + " Remarks: Another remarks section \n" + " \n" + " @return Whatever \n" + " \n" + " @return it \n" + " \n" + " @return may return \n" + " \n" + " @see someOtherMethod \n" + " \n" + " @see function \n" + " \n" + " @since version 0.0.0.1 \n" + " \n" + " @throws superException \n" + " \n" + " @throws RuntimeError \n" + " \n" + " TODO: Some very important task \n" + " \n" + " @param b B is mentioned again... \n" + " \n" + " {@literal \n" + "very long \n" + "text with tags \n" + " }\n" + " \n" + " @version 0.0.0.2 \n" + " \n" + " Warning: This is senseless! \n" + " \n" + " Here goes test of symbols: \n" + " $ @ \\ & ~ < > # % " . :: \n" + " \n" + " And here goes simple text \n" + " \n" + ""); wantedComments.put("doxygen_translate.doxygen_translate.htmlFunction(int, float)", " Test for html tags. See Doxygen doc for list of tags recognized by Doxygen. \n" + " \n" + " This is link \n" + " bold \n" + "
    \n" + " Quotation block. \n" + "
    \n" + "
    \n" + "
    center
    \n" + " this is code \n" + "
    Starts an item description. \n" + " Starts a piece of text displayed in a typewriter font. \n" + " \n" + "
    Starts a section with a specific style (HTML only) \n" + "
    \n" + "
    Starts a description list. \n" + "
    Starts an item title.
    \n" + "
    \n" + " Starts a piece of text displayed in an italic font. \n" + " \n" + "
    'Form' does not generate any output. \n" + "
    \n" + "
    \n" + "

    Starts an unnumbered section. \n" + "

    \n" + "

    Starts an unnumbered subsection. \n" + "

    \n" + "

    Starts an unnumbered subsubsection. \n" + "

    \n" + " Starts a piece of text displayed in an italic font. \n" + " Does not generate any output. \n" + " \n" + " \n" + " Does not generate any output. \n" + " ignored by doxygen. \n" + " ignored by doxygen. \n" + " \n" + "
      Starts a numbered item list. \n" + "
    1. Starts a new list item. \n" + "
    2. \n" + "
    Ends a numbered item list. \n" + " \n" + "

    Starts a new paragraph. \n" + "

    \n" + "
     Starts a preformatted fragment.                                                \n" +
        		" 
    \n" + " Starts a section of text displayed in a smaller font. \n" + " \n" + " Starts an inline text fragment with a specific style (HTML only) \n" + " \n" + " Starts a section of bold text. \n" + " \n" + " Starts a piece of text displayed in subscript. \n" + " \n" + " Starts a piece of text displayed in superscript. \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "
    Animals
    cow dog
    cow dog
    cat mouse
    horse parrot
    \n" + " \n" + " Starts a piece of text displayed in a typewriter font. \n" + " \n" + " Starts a piece of text displayed in a typewriter font. \n" + " \n" + " \n" + "
      Starts an unnumbered item list. \n" + "
    • Starts a new list item 1.
    • \n" + "
    • Starts a new list item 2.
    • \n" + "
    • Starts a new list item 3.
    • \n" + "
    Ends an unnumbered item list. \n" + " \n" + " Starts a piece of text displayed in an italic font. \n" + " \n" + ""); // and ask the parser to check comments for us System.exit(parser.check(wantedComments)); } }