-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixes #145 * Renamed `intergration` to `integration` globally * Fixes #217 * Added documentation comments before `syntax`, `import`, `package`, `option`, and `reserved` keywords in grammar * The root cause is the change to docComment to make it non-skipped, so we have to add it everywhere. Skipped comments (the `//` type) can be absolutely anywhere because the grammar _skips_ them. * Note, this _might_ also fix #319 Signed-off-by: Joseph Sinclair <121976561+jsync-swirlds@users.noreply.github.com>
- Loading branch information
1 parent
1ad0f26
commit 499ec7d
Showing
25 changed files
with
94 additions
and
130 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...edera/pbj/intergration/jmh/JsonBench.java → ...hedera/pbj/integration/jmh/JsonBench.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...intergration/jmh/ProtobufObjectBench.java → .../integration/jmh/ProtobufObjectBench.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...era/pbj/intergration/jmh/VarIntBench.java → ...dera/pbj/integration/jmh/VarIntBench.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...ntegration-tests/src/test/java/com/hedera/pbj/integration/test/CompareToNegativeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.hedera.pbj.integration.test; | ||
|
||
import static com.hedera.pbj.compiler.PbjCompiler.compileFilesIn; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertThrows; | ||
|
||
import java.io.File; | ||
import java.net.URL; | ||
import java.util.List; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.io.TempDir; | ||
|
||
class CompareToNegativeTest { | ||
|
||
@TempDir | ||
private static File outputDir; | ||
|
||
@Test | ||
void testNonComparableSubObj() { | ||
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> | ||
getCompileFilesIn("non_compilable_comparable_sub_obj.proto")); | ||
assertEquals("Field NonComparableSubObj.subObject specified in `pbj.comparable` option must implement `Comparable` interface but it doesn't.", | ||
exception.getMessage()); | ||
} | ||
|
||
@Test | ||
void testRepeatedField() { | ||
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> | ||
getCompileFilesIn("non_compilable_comparable_repeated.proto")); | ||
assertEquals("Field `int32List` specified in `pbj.comparable` option is repeated. Repeated fields are not supported by this option.", | ||
exception.getMessage()); | ||
} | ||
|
||
@Test | ||
void testNonComparableOneOfField() { | ||
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> | ||
getCompileFilesIn("non_compilable_comparable_oneOf.proto")); | ||
assertEquals("Field NonComparableSubObj.subObject specified in `pbj.comparable` option must implement `Comparable` interface but it doesn't.", | ||
exception.getMessage()); | ||
} | ||
|
||
private static void getCompileFilesIn(String fileName) throws Exception { | ||
URL fileUrl = CompareToNegativeTest.class.getClassLoader().getResource(fileName); | ||
compileFilesIn(List.of(new File(fileUrl.toURI())), outputDir, outputDir); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
.../pbj/intergration/test/CompareToTest.java → ...a/pbj/integration/test/CompareToTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...st/ExtendedUtf8MessageWithStringTest.java → ...st/ExtendedUtf8MessageWithStringTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../intergration/test/FieldsNonNullTest.java → ...j/integration/test/FieldsNonNullTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../pbj/intergration/test/JsonCodecTest.java → ...a/pbj/integration/test/JsonCodecTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tergration/test/MalformedMessageTest.java → ...ntegration/test/MalformedMessageTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...a/pbj/intergration/test/MaxDepthTest.java → ...ra/pbj/integration/test/MaxDepthTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ra/pbj/intergration/test/MaxSizeTest.java → ...era/pbj/integration/test/MaxSizeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tergration/test/ParserNeverWrapsTest.java → ...ntegration/test/ParserNeverWrapsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.