Merge remote-tracking branch 'org/master' into octave-4-4-bugfix

Just to bring the changes on current master to check the result of the
CI system (The CI already failed on the base of the original commit).
This commit is contained in:
Markus Friedrich 2019-12-24 14:09:57 +01:00
commit 60b756de50
31 changed files with 448 additions and 204 deletions

View file

@ -610,11 +610,14 @@ CPP11_TEST_BROKEN = \
# cpp11_reference_wrapper \ # No typemaps
# Doxygen support test cases: can only be used with languages supporting
# Doxygen comment translation, currently only Python and Java.
# Doxygen comment translation (currently Python and Java) and only if not
# disabled by configure via SKIP_DOXYGEN_TEST_CASES.
ifneq ($(SKIP_DOXYGEN_TEST_CASES),1)
python_HAS_DOXYGEN := 1
java_HAS_DOXYGEN := 1
$(eval HAS_DOXYGEN := $($(LANGUAGE)_HAS_DOXYGEN))
endif
ifdef HAS_DOXYGEN
DOXYGEN_TEST_CASES += \

View file

@ -138,3 +138,31 @@ void DerivedNoVirtualStruct::ef() {}
DerivedNoVirtualStruct::~DerivedNoVirtualStruct() {}
%}
%inline %{
namespace Outer {
namespace final {
template <typename T> struct smart_ptr {
typedef T type;
};
}
namespace override {
template <typename T> struct dumb_ptr {
typedef T type;
};
}
}
%}
%template(SmartPtrBaseStruct) Outer::final::smart_ptr<DerivedStruct>;
%inline %{
class ObjectDB
{
public:
static void smart1(typename Outer::final::smart_ptr<DerivedStruct>::type *objectT) {}
static void smart2(Outer::final::smart_ptr<DerivedStruct>::type *objectT) {}
static void dumb1(typename Outer::override::dumb_ptr<DerivedStruct>::type *objectT) {}
static void dumb2(Outer::override::dumb_ptr<DerivedStruct>::type *objectT) {}
static Outer::final::smart_ptr<DerivedStruct>::type get() { return DerivedStruct(); }
};
%}

View file

@ -16,6 +16,7 @@ CPP_TEST_CASES = \
complextest \
csharp_attributes \
csharp_swig2_compatibility \
csharp_director_typemaps \
csharp_exceptions \
csharp_features \
csharp_lib_arrays \

View file

@ -0,0 +1,53 @@
using System;
using System.Reflection;
using csharp_director_typemapsNamespace;
public class csharp_director_typemaps_runme {
class CSharpDirectorTypemaps_InStreamDerived : InStream
{
private int constant;
public CSharpDirectorTypemaps_InStreamDerived(int constant) { this.constant = constant; }
public override int Read(global::System.IntPtr buf, int len, out int readLen) {
readLen = (buf == global::System.IntPtr.Zero) ? -len - constant : len + constant;
return readLen;
}
public override int Write(global::System.IntPtr buf, int len, out int writeLen) {
writeLen = (buf == global::System.IntPtr.Zero) ? -len - constant : len + constant;
return writeLen;
}
}
public static void Main() {
int outLen = -1;
int k = 100;
int j = 23;
InStream instream = new CSharpDirectorTypemaps_InStreamDerived(k);
{
int ret = csharp_director_typemaps.callRead(instream, InStream.getCPtr(instream).Handle, j, out outLen);
Assert(outLen, j + k);
Assert(ret, j + k);
}
{
int ret = csharp_director_typemaps.callRead(instream, global::System.IntPtr.Zero, j, out outLen);
Assert(outLen, -j - k);
Assert(ret, -j - k);
}
{
int ret = csharp_director_typemaps.callWrite(instream, InStream.getCPtr(instream).Handle, j, out outLen);
Assert(outLen, j + k);
Assert(ret, j + k);
}
{
int ret = csharp_director_typemaps.callWrite(instream, global::System.IntPtr.Zero, j, out outLen);
Assert(outLen, -j - k);
Assert(ret, -j - k);
}
}
private static void Assert(int i1, int i2) {
if (i1 != i2)
throw new Exception("assertion failure. " + i1 + " != " + i2);
}
}

View file

@ -0,0 +1,37 @@
%module (directors="1") csharp_director_typemaps
// This tests that the csout typemap is handled correctly in the director code.
// The 'out' needs stripping in some parts of the generated director code.
%feature("director") InStream;
%apply void *VOID_INT_PTR { void * }
%typemap(ctype) int* readLen, int* writeLen "/*ctype*/ int*"
%typemap(imtype) int* readLen, int* writeLen "/*imtype*/ out int"
%typemap(cstype) int* readLen "/*cstype*/ out int"
// Note for below: 'out' used in typemap comment
%typemap(cstype) int* writeLen "/*out cstype out*/ out int"
%typemap(csin) int* readLen, int* writeLen "/*csin*/ out $csinput"
%typemap(in) int* readLen, int* writeLen %{/*in*/ $1 = ($1_ltype)$input; %}
%typemap(out) int* readLen, int* writeLen %{/*out*/ $result = (void *)$1; %}
%typemap(csdirectorin) int* readLen, int* writeLen "/*csdirectorin*/ out $iminput"
%typemap(csdirectorout) int* readLen, int* writeLen "/*csdirectorout*/ $cscall"
%typemap(directorin) int* readLen, int* writeLen "/*directorin*/ $input = $1;"
%typemap(directorout) int* readLen, int* writeLen %{/*directorout*/ $result = ($1_ltype)$input; %}
%inline %{
class InStream
{
public:
virtual int Read(void* buf, int len, int* readLen) = 0;
virtual int Write(void* buf, int len, int* writeLen) = 0;
virtual ~InStream() {}
};
int callRead(InStream* stream, void* buf, int len, int* readLen) {
return stream->Read(buf, len, readLen);
}
int callWrite(InStream* stream, void* buf, int len, int* writeLen) {
return stream->Write(buf, len, writeLen);
}
%}

View file

@ -1,5 +1,6 @@
import com.sun.javadoc.*;
import com.sun.source.doctree.*;
import com.sun.source.util.DocTrees;
import java.util.HashMap;
import java.util.Map.Entry;
import java.util.Map;
@ -9,45 +10,120 @@ import java.io.BufferedWriter;
import java.io.OutputStreamWriter;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.*;
import java.util.spi.ToolProvider;
import javax.lang.model.*;
import javax.lang.model.element.*;
import javax.lang.model.util.*;
import jdk.javadoc.doclet.*;
public class CommentParser {
public class CommentParser implements Doclet {
private static Map<String, String> m_parsedComments = new HashMap<String, String>();
public static boolean start(RootDoc root) {
// We need to implement these base class pure virtual methods.
@Override
public void init(Locale locale, Reporter reporter) {
}
@Override
public Set<? extends Option> getSupportedOptions() {
return new HashSet<>();
}
@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latest();
}
@Override
public String getName() {
return "CommentParser";
}
// Element name must be the fully qualified name of the element.
//
// If there is no comment associated with this element, simply do nothing.
private void storeCommentFor(DocTrees docTrees, String fullName, Element e) {
DocCommentTree docCommentTree = docTrees.getDocCommentTree(e);
if (docCommentTree == null)
return;
StringBuilder name = new StringBuilder(fullName);
// We must use signature in the key for methods for compatibility with
// the existing tests and to allow distinguishing between overloaded
// methods.
if (e instanceof ExecutableElement) {
ExecutableElement ex = (ExecutableElement)e;
name.append("(");
boolean firstParam = true;
for (VariableElement p : ex.getParameters()) {
if (firstParam) {
firstParam = false;
} else {
name.append(", ");
}
name.append(p.asType().toString());
}
name.append(")");
}
// For some reason the comment in the source is split into "body" and
// "block tags" parts, so we need to concatenate them back together.
StringBuilder comment = new StringBuilder();
for (DocTree d : docCommentTree.getFullBody()) {
comment.append(d.toString());
comment.append("\n");
}
boolean firstBlockTag = true;
for (DocTree d : docCommentTree.getBlockTags()) {
if (firstBlockTag) {
firstBlockTag = false;
comment.append("\n");
}
comment.append(d.toString());
comment.append("\n");
}
m_parsedComments.put(name.toString(), comment.toString());
}
@Override
public boolean run(DocletEnvironment docEnv) {
/*
* This method is called by 'javadoc' and gets the whole parsed java
* file, we get comments and store them
*/
DocTrees docTrees = docEnv.getDocTrees();
for (TypeElement t : ElementFilter.typesIn(docEnv.getIncludedElements())) {
String typeName = t.getQualifiedName().toString();
for (ClassDoc classDoc : root.classes()) {
storeCommentFor(docTrees, typeName, t);
if (classDoc.getRawCommentText().length() > 0)
m_parsedComments.put(classDoc.qualifiedName(), classDoc.getRawCommentText());
for (Element e : t.getEnclosedElements()) {
// Omit the method name for ctors: this is a bit weird, but
// this is what the existing tests expect.
String fullName = typeName;
if (e.getKind() != ElementKind.CONSTRUCTOR) {
fullName = fullName + "." + e.getSimpleName();
}
for (FieldDoc f : classDoc.enumConstants()) {
if (f.getRawCommentText().length() > 0)
m_parsedComments.put(f.qualifiedName(), f.getRawCommentText());
}
for (FieldDoc f : classDoc.fields()) {
if (f.getRawCommentText().length() > 0)
m_parsedComments.put(f.qualifiedName(), f.getRawCommentText());
}
for (ConstructorDoc c : classDoc.constructors()) {
if (c.getRawCommentText().length() > 0)
m_parsedComments.put(c.toString(), c.getRawCommentText());
}
for (MethodDoc m : classDoc.methods()) {
if (m.getRawCommentText().length() > 0)
m_parsedComments.put(m.toString(), m.getRawCommentText());
storeCommentFor(docTrees, fullName, e);
}
}
return true;
}
public int check(Map<String, String> wantedComments) {
public static int check(Map<String, String> wantedComments) {
int errorCount=0;
Iterator<Entry<String, String>> it = m_parsedComments.entrySet().iterator();
@ -93,13 +169,14 @@ public class CommentParser {
System.out.println("Output is also saved to files '" + expectedFileName +
"' and '" + gotFileName + "'");
// here we print original strings, for nicer output
System.out.println("\n\n---\nexpected:\n" + wantedComments.get(e.getKey()));
System.out.println("\n\n---\nexpected:\n" + wantedStr);
System.out.println("\n\n---\ngot:\n" + e.getValue());
try {
// write expected string to file
BufferedWriter expectedFile = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(expectedFileName)));
expectedFile.write(wantedComments.get(e.getKey()));
if (wantedStr != null)
expectedFile.write(wantedStr);
expectedFile.close();
// write translated string to file
@ -130,7 +207,7 @@ public class CommentParser {
}
private void printKeys(Map<String, String> map) {
private static void printKeys(Map<String, String> map) {
Set<String> keys = map.keySet();
for (String key : keys) {
@ -154,6 +231,15 @@ public class CommentParser {
}
}
public static void parse(String sourcefile) {
ToolProvider javadoc = ToolProvider.findFirst("javadoc").orElseThrow();
int result = javadoc.run(System.out, System.err, new String[]{"-quiet", "-doclet", "CommentParser", sourcefile});
if (result != 0) {
System.err.println("Executing javadoc failed.");
System.exit(result);
}
}
public static void main(String argv[]) {
@ -162,8 +248,7 @@ public class CommentParser {
System.exit(1);
}
com.sun.tools.javadoc.Main.execute("The comment parser program",
"CommentParser", new String[]{"-quiet", argv[0]});
parse(argv[0]);
// if we are run as standalone app, print the list of found comments as it would appear in java source

View file

@ -9,6 +9,7 @@ JAVAFLAGS = @JAVAFLAGS@
JAVA_CLASSPATH_SEP = @JAVA_CLASSPATH_SEP@
JAVA_TOOLS_JAR = @JAVA_TOOLS_JAR@
SCRIPTSUFFIX = _runme.java
SKIP_DOXYGEN_TEST_CASES = @JAVA_SKIP_DOXYGEN_TEST_CASES@
srcdir = @srcdir@
top_srcdir = ../@top_srcdir@
@ -108,13 +109,11 @@ setup = \
mkdir $(JAVA_PACKAGE); \
fi
# Doxygen test cases need to be compiled together with the CommentParser class
# which depends on com.sun.javadoc package which is located in this JAR.
# Doxygen test cases need to be compiled together with the CommentParser class.
CommentParser.class:
$(COMPILETOOL) $(JAVAC) -classpath $(JAVA_CLASSPATH) -d . $(srcdir)/CommentParser.java
JAVA_CLASSPATH := .
$(DOXYGEN_TEST_CASES:=.cpptest): JAVA_CLASSPATH := "$(JAVA_TOOLS_JAR)$(JAVA_CLASSPATH_SEP)."
$(DOXYGEN_TEST_CASES:=.cpptest): CommentParser.class
# Compiles java files then runs the testcase. A testcase is only run if

View file

@ -1,6 +1,5 @@
import doxygen_alias.*;
import com.sun.javadoc.*;
import java.util.HashMap;
public class doxygen_alias_runme {
@ -15,10 +14,7 @@ public class doxygen_alias_runme {
public static void main(String argv[])
{
CommentParser parser = new CommentParser();
com.sun.tools.javadoc.Main.execute("doxygen_alias runtime test",
"CommentParser",
new String[]{"-quiet", "doxygen_alias"});
CommentParser.parse("doxygen_alias");
HashMap<String, String> wantedComments = new HashMap<String, String>();
wantedComments.put("doxygen_alias.doxygen_alias.make_something()",
@ -27,6 +23,6 @@ public class doxygen_alias_runme {
" @return A new object which may be null.\n" +
"");
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}

View file

@ -1,6 +1,5 @@
import doxygen_basic_notranslate.*;
import com.sun.javadoc.*;
import java.util.HashMap;
public class doxygen_basic_notranslate_runme {
@ -15,14 +14,7 @@ public class doxygen_basic_notranslate_runme {
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_basic_notranslate runtime test",
"CommentParser",
new String[]{"-quiet", "doxygen_basic_notranslate"});
CommentParser.parse("doxygen_basic_notranslate");
HashMap<String, String> wantedComments = new HashMap<String, String>();
wantedComments.put("doxygen_basic_notranslate.doxygen_basic_notranslate.function3(int)",
@ -97,6 +89,6 @@ public class doxygen_basic_notranslate_runme {
"");
// and ask the parser to check comments for us
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}

View file

@ -1,6 +1,5 @@
import doxygen_basic_translate.*;
import com.sun.javadoc.*;
import java.util.HashMap;
public class doxygen_basic_translate_runme {
@ -15,14 +14,7 @@ public class doxygen_basic_translate_runme {
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_basic_translate runtime test",
"CommentParser",
new String[]{"-quiet", "doxygen_basic_translate"});
CommentParser.parse("doxygen_basic_translate");
HashMap<String, String> wantedComments = new HashMap<String, String>();
@ -96,6 +88,6 @@ public class doxygen_basic_translate_runme {
"");
// and ask the parser to check comments for us
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}

View file

@ -1,6 +1,5 @@
import doxygen_basic_translate_style2.*;
import com.sun.javadoc.*;
import java.util.HashMap;
public class doxygen_basic_translate_style2_runme {
@ -15,14 +14,7 @@ public class doxygen_basic_translate_style2_runme {
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_basic_translate_style2 runtime test",
"CommentParser",
new String[]{"-quiet", "doxygen_basic_translate_style2"});
CommentParser.parse("doxygen_basic_translate_style2");
HashMap<String, String> wantedComments = new HashMap<String, String>();
@ -96,6 +88,6 @@ public class doxygen_basic_translate_style2_runme {
"");
// and ask the parser to check comments for us
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}

View file

@ -1,6 +1,5 @@
import doxygen_ignore.*;
import com.sun.javadoc.*;
import java.util.HashMap;
public class doxygen_ignore_runme {
@ -15,10 +14,7 @@ public class doxygen_ignore_runme {
public static void main(String argv[])
{
CommentParser parser = new CommentParser();
com.sun.tools.javadoc.Main.execute("doxygen_ignore runtime test",
"CommentParser",
new String[]{"-quiet", "doxygen_ignore"});
CommentParser.parse("doxygen_ignore");
HashMap<String, String> wantedComments = new HashMap<String, String>();
wantedComments.put("doxygen_ignore.doxygen_ignore.func()",
@ -39,6 +35,6 @@ public class doxygen_ignore_runme {
"\n" +
"");
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}

View file

@ -1,6 +1,5 @@
import doxygen_misc_constructs.*;
import com.sun.javadoc.*;
import java.util.HashMap;
public class doxygen_misc_constructs_runme {
@ -15,14 +14,7 @@ public class doxygen_misc_constructs_runme {
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_misc_constructs runtime test",
"CommentParser",
new String[]{"-quiet", "doxygen_misc_constructs"});
CommentParser.parse("doxygen_misc_constructs");
HashMap<String, String> wantedComments = new HashMap<String, String>();
@ -195,6 +187,6 @@ public class doxygen_misc_constructs_runme {
// and ask the parser to check comments for us
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}

View file

@ -1,5 +1,4 @@
import doxygen_nested_class.*;
import com.sun.javadoc.*;
import java.util.HashMap;
public class doxygen_nested_class_runme {
@ -14,14 +13,7 @@ public class doxygen_nested_class_runme {
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_nested_class runtime test",
"CommentParser",
new String[]{"-quiet", "doxygen_nested_class"});
CommentParser.parse("doxygen_nested_class");
HashMap<String, String> wantedComments = new HashMap<String, String>();
@ -43,6 +35,6 @@ public class doxygen_nested_class_runme {
" doxShort const variable ");
// and ask the parser to check comments for us
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}

View file

@ -1,6 +1,5 @@
import doxygen_parsing_enums_proper.*;
import com.sun.javadoc.*;
import java.util.HashMap;
public class doxygen_parsing_enums_proper_runme {
@ -15,14 +14,7 @@ public class doxygen_parsing_enums_proper_runme {
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_parsing_enums_proper runtime test",
"CommentParser",
new String[]{"-quiet", "doxygen_parsing_enums_proper"});
CommentParser.parse("doxygen_parsing_enums_proper");
HashMap<String, String> wantedComments = new HashMap<String, String>();
@ -61,6 +53,6 @@ public class doxygen_parsing_enums_proper_runme {
"Post comment after last comma.");
// and ask the parser to check comments for us
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}

View file

@ -1,6 +1,5 @@
import doxygen_parsing_enums_simple.*;
import com.sun.javadoc.*;
import java.util.HashMap;
public class doxygen_parsing_enums_simple_runme {
@ -15,14 +14,7 @@ public class doxygen_parsing_enums_simple_runme {
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_parsing_enums_simple runtime test",
"CommentParser",
new String[]{"-quiet", "doxygen_parsing_enums_simple"});
CommentParser.parse("doxygen_parsing_enums_simple");
HashMap<String, String> wantedComments = new HashMap<String, String>();
@ -53,6 +45,6 @@ public class doxygen_parsing_enums_simple_runme {
"Post comment after last comma.");
// and ask the parser to check comments for us
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}

View file

@ -1,6 +1,5 @@
import doxygen_parsing_enums_typesafe.*;
import com.sun.javadoc.*;
import java.util.HashMap;
public class doxygen_parsing_enums_typesafe_runme {
@ -15,14 +14,7 @@ public class doxygen_parsing_enums_typesafe_runme {
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_parsing_enums_typesafe runtime test",
"CommentParser",
new String[]{"-quiet", "doxygen_parsing_enums_typesafe"});
CommentParser.parse("doxygen_parsing_enums_typesafe");
HashMap<String, String> wantedComments = new HashMap<String, String>();
@ -62,6 +54,6 @@ public class doxygen_parsing_enums_typesafe_runme {
// and ask the parser to check comments for us
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}

View file

@ -1,6 +1,5 @@
import doxygen_parsing_enums_typeunsafe.*;
import com.sun.javadoc.*;
import java.util.HashMap;
public class doxygen_parsing_enums_typeunsafe_runme {
@ -15,14 +14,7 @@ public class doxygen_parsing_enums_typeunsafe_runme {
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_parsing_enums_typeunsafe runtime test",
"CommentParser",
new String[]{"-quiet", "doxygen_parsing_enums_typeunsafe"});
CommentParser.parse("doxygen_parsing_enums_typeunsafe");
HashMap<String, String> wantedComments = new HashMap<String, String>();
@ -61,6 +53,6 @@ public class doxygen_parsing_enums_typeunsafe_runme {
"Post comment after last comma.");
// and ask the parser to check comments for us
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}

View file

@ -1,6 +1,5 @@
import doxygen_parsing.*;
import com.sun.javadoc.*;
import java.util.HashMap;
public class doxygen_parsing_runme {
@ -15,14 +14,7 @@ public class doxygen_parsing_runme {
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_parsing runtime test",
"CommentParser",
new String[]{"-quiet", "doxygen_parsing"});
CommentParser.parse("doxygen_parsing");
HashMap<String, String> wantedComments = new HashMap<String, String>();
@ -136,6 +128,6 @@ public class doxygen_parsing_runme {
"");
// and ask the parser to check comments for us
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}

View file

@ -1,6 +1,5 @@
import doxygen_translate_all_tags.*;
import com.sun.javadoc.*;
import java.util.HashMap;
public class doxygen_translate_all_tags_runme {
@ -15,14 +14,7 @@ public class doxygen_translate_all_tags_runme {
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_all_tags runtime test",
"CommentParser",
new String[]{"-quiet", "doxygen_translate_all_tags"});
CommentParser.parse("doxygen_translate_all_tags");
HashMap<String, String> wantedComments = new HashMap<String, String>();
@ -154,6 +146,6 @@ public class doxygen_translate_all_tags_runme {
" And here goes simple text \n" +
"");
// and ask the parser to check comments for us
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}

View file

@ -1,6 +1,5 @@
import doxygen_translate_links.*;
import com.sun.javadoc.*;
import java.util.HashMap;
public class doxygen_translate_links_runme {
@ -15,14 +14,7 @@ public class doxygen_translate_links_runme {
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_links runtime test",
"CommentParser",
new String[]{"-quiet", "doxygen_translate_links"});
CommentParser.parse("doxygen_translate_links");
HashMap<String, String> wantedComments = new HashMap<String, String>();
@ -64,6 +56,6 @@ public class doxygen_translate_links_runme {
"");
// and ask the parser to check comments for us
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}

View file

@ -1,6 +1,5 @@
import doxygen_translate.*;
import com.sun.javadoc.*;
import java.util.HashMap;
import java.util.Map;
@ -16,14 +15,7 @@ public class doxygen_translate_runme {
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"});
CommentParser.parse("doxygen_translate");
Map<String, String> wantedComments = new HashMap<String, String>();
@ -274,6 +266,6 @@ public class doxygen_translate_runme {
"");
// and ask the parser to check comments for us
System.exit(parser.check(wantedComments));
System.exit(CommentParser.check(wantedComments));
}
}