[tests] message texts in Javadoc highlighting tests

This commit is contained in:
Roman Shevchenko
2017-04-07 18:48:45 +02:00
parent a31c85b322
commit 2a47148d94
22 changed files with 100 additions and 104 deletions

View File

@@ -1,10 +1,10 @@
import java.util.*;
class Test<T> {
public void read(List<T> list){}
class Test<T> {
public void read(List<T> list) {}
/**
* @see #read(java.util.List<warning><</warning>T<warning>></warning>)
* @see #read(java.util.List<warning descr="Illegal character"><</warning>T<warning descr="Illegal character">></warning>)
*/
public void write(){}
public void write() {}
}

View File

@@ -1,8 +1,8 @@
class Test {
/**
* This element was written by {@link Test#write(Object, <error>XmlWriter</error>)}
/**
* This element was written by {@link Test#write(Object, <error descr="Cannot resolve symbol 'XmlWriter'">XmlWriter</error>)}
* method. So <code>read</code> and <code>write</code> methods should be consistent.
*/
public void read(){}
public void write(Object o, <error>XmlWriter</error> writer){}
public void read() {}
public void write(Object o, <error descr="Cannot resolve symbol 'XmlWriter'">XmlWriter</error> writer) {}
}

View File

@@ -1,8 +1,8 @@
class Test {
/**
* @throws <warning>SomeClass</warning> asdfasd
*/
public void foo() {}
class SomeClass {}
/**
* @throws <warning descr="Class Test.SomeClass is not a descendant of Throwable">SomeClass</warning> asdfasd
*/
public void foo() {}
class SomeClass {}
}

View File

@@ -1,7 +1,6 @@
class Test {
/**
* <warning>@inheritDoc</warning>
*/
void a() {
}
* <warning descr="Tag 'inheritDoc' is not allowed here">@inheritDoc</warning>
*/
void a() {}
}

View File

@@ -1,6 +1,4 @@
<warning>/**</warning>
<warning descr="Period in the documentation is missing. The period is used by the Javadoc tool to generate the comment for the overview page">/**</warning>
* Missing dot
*/
class Test {
}
class Test { }

View File

@@ -1,7 +1,5 @@
<warning>/**</warning>
* Do smth
* @author me.
*/
class Test {
}
<warning descr="Period in the documentation is missing. The period is used by the Javadoc tool to generate the comment for the overview page">/**</warning>
* Do smth
* @author me.
*/
class Test { }

View File

@@ -1,8 +1,10 @@
class Test {
/**
* @param ppp see {@link #<error>Test</error>}
*/
public void i(int ppp) {}
class A{ public void foo() {}}
/**
* @param ppp see {@link #<error descr="Cannot resolve symbol 'Test'">Test</error>}
*/
public void i(int ppp) {}
class A {
public void foo() {}
}
}

View File

@@ -1,8 +1,8 @@
class MissingRetunDescription {
/**
* <warning>@return</warning>
* @throws Exception in some case
*/
* <warning descr="'@return' tag description is missing">@return</warning>
* @throws Exception in some case
*/
public boolean foo() throws Exception {
return false;
}

View File

@@ -1,9 +1,10 @@
import java.io.IOException;
class Test {
/**
* @throws IOException in some case
* <warning>@throws</warning> IOException
*/
* @throws IOException in some case
* <warning descr="'throws' tag description is missing"><warning descr="Duplicate @throws or @exception tag for exception 'java.io.IOException'">@throws</warning></warning> IOException
*/
void a() throws IOException{
throw new IOException();
}

View File

@@ -1,5 +1,4 @@
/**
* @param <error>myParam</error> paramDescription
* @param <error descr="Cannot resolve symbol 'myParam'">myParam</error> paramDescription
*/
class Test {
}
class Test { }

View File

@@ -1,7 +1,6 @@
class Test {
/**
* @param <error>param</error> some param
*/
public void foo() {
}
/**
* @param <error descr="Cannot resolve symbol 'param'">param</error> some param
*/
public void foo() { }
}

View File

@@ -1,8 +1,7 @@
class Test {
/**
* @param <error>i</error> here description goes
* <warning>@return</warning>
*/
int d(){return 1;}
}
/**
* @param <error descr="Cannot resolve symbol 'i'">i</error> here description goes
* <warning descr="'@return' tag description is missing">@return</warning>
*/
int d() { return 1; }
}

View File

@@ -1,6 +1,6 @@
class Test {
/**
* <warning>@return</warning> returns
*/
public void foo() {}
/**
* <warning descr="Tag 'return' is not allowed here">@return</warning> returns
*/
public void foo() {}
}

View File

@@ -1,8 +1,10 @@
class Test {
/**
* @see A#<error>someField</error>
*/
public void i() {}
/**
* @see A#<error descr="Cannot resolve symbol 'someField'">someField</error>
*/
public void i() {}
class A{ public void foo() {}}
class A {
public void foo() {}
}
}

View File

@@ -1,12 +1,11 @@
public class SeeConstants {
public static final String III = "";
public static final String UUU="";
public static final String UUU = "";
/**
* @see SeeConstants.<error>III</error>
* @see SeeConstants.<error descr="Cannot resolve symbol 'SeeConstants.III'">III</error>
* @see SeeConstants#UUU
* @param args blah-blah
*/
public static void main(String[] args) {
}
}
public static void main(String[] args) { }
}

View File

@@ -1,19 +1,19 @@
/**
* {<warning>@linked</warning>}
* {<warning descr="Wrong tag 'linked'">@linked</warning>}
*/
class Foo {
/**
* @param i some param {<warning>@vaaalue</warning> #field}
* @param i some param {<warning descr="Wrong tag 'vaaalue'">@vaaalue</warning> #field}
*/
void foo(int i) {}
/**
* {<warning>@linke</warning>}
* {<warning descr="Wrong tag 'linke'">@linke</warning>}
*/
int field;
/**
* Don't ever think of going here: {<warning>@link/login</warning>}
* Don't ever think of going here: {<warning descr="Wrong tag 'link/login'">@link/login</warning>}
*/
void m() {}
}

View File

@@ -1,14 +1,14 @@
/**
* <warning>@foo</warning>
* <warning descr="Wrong tag 'foo'">@foo</warning>
*/
class Foo {
/**
* <warning>@foo</warning>
* <warning descr="Wrong tag 'foo'">@foo</warning>
*/
void foo() {}
/**
* <warning>@foo</warning>
*/
* <warning descr="Wrong tag 'foo'">@foo</warning>
*/
int field;
}

View File

@@ -1,7 +1,7 @@
class Test {
/**
* Value is {@value #<error>badReference</error>}
* @param ppp .
*/
public void i(int ppp) {}
/**
* Value is {@value #<error descr="Cannot resolve symbol 'badReference'">badReference</error>}
* @param ppp .
*/
public void i(int ppp) {}
}

View File

@@ -1,8 +1,8 @@
class Test {
/**
* Value is {@value <error>#g</error>}
*/
public void i() {}
/**
* Value is {@value <error descr="@value tag must reference a field">#g</error>}
*/
public void i() {}
public void g() {}
public void g() {}
}

View File

@@ -1,8 +1,8 @@
class Test {
public int A = 1;
public int A = 1;
/**
* Value is {@value <error>#A</error>}
*/
public void i() {}
/**
* Value is {@value <error descr="@value tag must reference a static field">#A</error>}
*/
public void i() {}
}

View File

@@ -1,8 +1,8 @@
class Test {
public static int A;
public static int A;
/**
* Value is {@value <error>#A</error>}
*/
public void i() {}
/**
* Value is {@value <error descr="@value tag must reference a field with a constant initializer">#A</error>}
*/
public void i() {}
}

View File

@@ -1,9 +1,9 @@
class Test {
public static final int A = 1;
public static final int A = 1;
/**
* Value is {@value <error>#A</error>}
* @param ppp .
*/
public void i(int ppp) {}
/**
* Value is {@value <error descr="@value tag may not have any arguments when JDK 1.4 or earlier is used">#A</error>}
* @param ppp .
*/
public void i(int ppp) {}
}