Skip to content

Commit

Permalink
Move tests to snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
antonsviridov-src committed Aug 5, 2024
1 parent 15ff2cd commit 7ee19e2
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,27 @@ private Semanticdb.UnaryOperator semanticdbUnaryOperator(Tree.Kind kind) {
case UNARY_MINUS:
return Semanticdb.UnaryOperator.UNARY_MINUS;

case UNARY_PLUS:
return Semanticdb.UnaryOperator.UNARY_PLUS;

case POSTFIX_INCREMENT:
return Semanticdb.UnaryOperator.UNARY_POSTFIX_INCREMENT;

case POSTFIX_DECREMENT:
return Semanticdb.UnaryOperator.UNARY_POSTFIX_DECREMENT;

case PREFIX_INCREMENT:
return Semanticdb.UnaryOperator.UNARY_PREFIX_INCREMENT;

case PREFIX_DECREMENT:
return Semanticdb.UnaryOperator.UNARY_PREFIX_DECREMENT;

case BITWISE_COMPLEMENT:
return Semanticdb.UnaryOperator.UNARY_BITWISE_COMPLEMENT;

case LOGICAL_COMPLEMENT:
return Semanticdb.UnaryOperator.UNARY_LOGICAL_COMPLEMENT;

default:
throw new IllegalStateException(
semanticdbUri + ": unexpected unary expression operator kind " + kind);
Expand Down
20 changes: 0 additions & 20 deletions tests/buildTools/src/test/scala/tests/MavenBuildToolSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,6 @@ class MavenBuildToolSuite extends BaseBuildToolSuite {
|""".stripMargin
)

// TODO: find more of a core location to move this to
checkBuild(
options = "annotation-parameters",
original =
s"""
|/pom.xml
|$pomXml
|/src/main/java/com/Foo.java
|public interface Foo {
| @Bar(-1d)
| double value();
|}
|/src/main/java/com/Bar.java
|@interface Bar {
| double value();
|}
|""".stripMargin,
expectedSemanticdbFiles = 2
)

checkBuild(
"build-command",
s"""|/pom.xml
Expand Down
20 changes: 20 additions & 0 deletions tests/minimized/src/main/java/minimized/AnnotationParameters.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package minimized;

interface Foo {
@Bar(-1d)
double test();

@Bar(~5)
double test2();

@BarB(!true)
double test3();
}

@interface Bar {
double value();
}

@interface BarB {
boolean value();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package minimized;

interface Foo {
// ^^^ definition semanticdb maven . . minimized/Foo#
// display_name Foo
// signature_documentation java interface Foo
// kind Interface
@Bar(-1d)
double test();

@Bar(~5)
double test2();

@BarB(!true)
double test3();
}

@interface Bar {
// ^^^ definition semanticdb maven . . minimized/Bar#
// display_name Bar
// signature_documentation java @interface Bar
// kind Interface
// relationship is_implementation semanticdb maven jdk 11 java/lang/annotation/Annotation#
double value();
}

@interface BarB {
// ^^^^ definition semanticdb maven . . minimized/BarB#
// display_name BarB
// signature_documentation java @interface BarB
// kind Interface
// relationship is_implementation semanticdb maven jdk 11 java/lang/annotation/Annotation#
boolean value();
// ^^^^^ definition semanticdb maven . . minimized/BarB#value().
// display_name value
// signature_documentation java public abstract boolean value()
// kind AbstractMethod
}

0 comments on commit 7ee19e2

Please sign in to comment.