blob: 0d8a5b9a7df14baff3965e81537ee4aa14c22a00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
package com.github.javaparser.ast.expr;
import com.github.javaparser.JavaParser;
import org.junit.Test;
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
public class InstanceOfExprTest {
@Test
public void annotationsOnTheType() {
InstanceOfExpr expr = JavaParser.parseExpression("s instanceof @A @DA String");
assertThat(expr.getType().getAnnotations()).containsExactly(new MarkerAnnotationExpr("A"), new MarkerAnnotationExpr("DA"));
}
}
|