paulk-asert commented on code in PR #2350:
URL: https://github.com/apache/groovy/pull/2350#discussion_r2580468746
##########
src/test/groovy/org/codehaus/groovy/transform/CanonicalComponentsTransformTest.groovy:
##########
@@ -564,7 +564,7 @@ class CanonicalComponentsTransformTest extends
GroovyShellTestCase {
// GROOVY-4570
void testToStringForEnums() {
- assert Color.PURPLE.toString() ==
'org.codehaus.groovy.transform.Color(r:255, g:0, b:255)'
+ assert Color.PURPLE.toString() == 'PURPLE(r:255, g:0, b:255)'
Review Comment:
It is following what the standard toString() for an enum would give.
Without `@ToString` you get:
```
enum E1 { OPTA, OPTB }
println E1.OPTA // OPTA
println E1.OPTB // OPTB
```
With `@ToString` you get:
```
@ToString
enum E2 { OPTA, OPTB }
println E2.OPTA // OPTA()
println E2.OPTB // OPTB()
```
Typically, you'd possibly only use this if you had properties.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]