Skip to content

Commit

Permalink
Improve AttributeTest
Browse files Browse the repository at this point in the history
  • Loading branch information
jevanlingen committed Dec 19, 2024
1 parent 0627f3d commit 0920cd5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ class AttributeTest implements RewriteTest {
@Test
void attribute() {
rewriteRun(
groovy("new User('Bob').@name == 'Bob'")
groovy("new User('Bob').@name")
);
}

@Test
void attributeInClosure() {
rewriteRun(
groovy("[new User('Bob')].find { it.@name == 'Bob' }")
groovy("[new User('Bob')].collect { it.@name }")
);
}

@Test
void attributeWithParentheses() {
rewriteRun(
groovy("(new User('Bob').@name) == 'Bob'")
groovy("(new User('Bob').@name)")
);
}
}

0 comments on commit 0920cd5

Please sign in to comment.