Skip to content

Commit

Permalink
#76 test with an @@ in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rfscholte committed Feb 5, 2021
1 parent 8a65af1 commit 37916ae
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,28 @@ public void testGetInterface()
assertNotNull(clss);
}

// Github #76
public void testAtInComment() throws Exception
{
String source = "// Generated by the protocol buffer compiler. DO NOT EDIT!\n"
+ "// source: model.proto\n"
+ "\n"
+ "public interface ModelOrBuilder {\n"
+ " // @@protoc_insertion_point(interface_extends:Model)\n"
+ "\n"
+ " /**\n"
+ " * <code>string name = 1;</code>\n"
+ " */\n"
+ " java.lang.String getName();\n"
+ " /**\n"
+ " * <code>string name = 1;</code>\n"
+ " */\n"
+ " String getNameBytes();\n"
+ "}";
JavaClass clazz = builder.addSource( new StringReader( source ) ).getClassByName( "ModelOrBuilder" );
assertEquals( 0, clazz.getMethods().get( 0 ).getAnnotations().size() );
}

public void testGenericEnumMethod() throws Exception {
String source = "package java.time.temporal;\r\n" +
"public final class IsoFields {\r\n" +
Expand Down

0 comments on commit 37916ae

Please # to comment.