Skip to content

Commit

Permalink
Java: add negative test case (IJ-CR-110898)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 92159e1a64c8b3533d76c5134b4e0216a26b6aee
  • Loading branch information
BasLeijdekkers authored and intellij-monorepo-bot committed Jul 19, 2023
1 parent 2489316 commit 69cae6f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

class TestAssignment {
interface States {
int INIT =0;
int INIT = 0;
int RUNNING = 1;
int STOPPED = 2;
}
@MagicConstant(valuesFromClass = States.class)
int state = <warning descr="Should be one of: States.INIT, States.RUNNING, States.STOPPED">0</warning>;

@MagicConstant(valuesFromClass = States.class)
int state2 = States.RUNNING;

public TestAssignment() {
this.state = <warning descr="Should be one of: States.INIT, States.RUNNING, States.STOPPED">0</warning>;
}
Expand Down

0 comments on commit 69cae6f

Please sign in to comment.