You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2023/06/10 03:38:36 UTC
[groovy] branch master updated: adjust test to account for JEP431 changes
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 3d4466d8aa adjust test to account for JEP431 changes
3d4466d8aa is described below
commit 3d4466d8aae7c998d8722dcc2f06ad47c584ede7
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sat Jun 10 13:08:38 2023 +1000
adjust test to account for JEP431 changes
---
.../groovy/transform/ImmutableTransformTest.groovy | 24 +++++++++++-----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/test/org/codehaus/groovy/transform/ImmutableTransformTest.groovy b/src/test/org/codehaus/groovy/transform/ImmutableTransformTest.groovy
index be611b9072..fa8a41bad9 100644
--- a/src/test/org/codehaus/groovy/transform/ImmutableTransformTest.groovy
+++ b/src/test/org/codehaus/groovy/transform/ImmutableTransformTest.groovy
@@ -825,7 +825,7 @@ final class ImmutableTransformTest {
def tester = new GroovyClassLoader().parseClass('''\
|@groovy.transform.Immutable(copyWith = true)
|class Person {
- | String first, last
+ | String firstname, lastname
| List<Person> copyWith( i ) {
| (1..i).collect { this }
| }
@@ -833,13 +833,13 @@ final class ImmutableTransformTest {
|'''.stripMargin() )
// One instance
- def tim = tester.newInstance( first:'tim', last:'yates' )
- assert tim.first == 'tim'
+ def tim = tester.newInstance( firstname:'tim', lastname:'yates' )
+ assert tim.firstname == 'tim'
// Check original copyWith remains
def result = tim.copyWith( 2 )
assert result.size() == 2
- assert result.first == [ 'tim', 'tim' ]
+ assert result.firstname == [ 'tim', 'tim' ]
}
@Test
@@ -848,7 +848,7 @@ final class ImmutableTransformTest {
|@groovy.transform.Immutable(copyWith = true)
|@groovy.transform.CompileStatic
|class Person {
- | String first, last
+ | String firstname, lastname
| List<Person> copyWith( i ) {
| (1..i).collect { this }
| }
@@ -856,13 +856,13 @@ final class ImmutableTransformTest {
|'''.stripMargin() )
// One instance
- def tim = tester.newInstance( first:'tim', last:'yates' )
- assert tim.first == 'tim'
+ def tim = tester.newInstance( firstname:'tim', lastname:'yates' )
+ assert tim.firstname == 'tim'
// Check original copyWith remains
def result = tim.copyWith( 2 )
assert result.size() == 2
- assert result.first == [ 'tim', 'tim' ]
+ assert result.firstname == [ 'tim', 'tim' ]
}
@Test
@@ -871,7 +871,7 @@ final class ImmutableTransformTest {
|@groovy.transform.Immutable(copyWith = true)
|@groovy.transform.TypeChecked
|class Person {
- | String first, last
+ | String firstname, lastname
| List<Person> copyWith( i ) {
| (1..i).collect { this }
| }
@@ -879,13 +879,13 @@ final class ImmutableTransformTest {
|'''.stripMargin() )
// One instance
- def tim = tester.newInstance( first:'tim', last:'yates' )
- assert tim.first == 'tim'
+ def tim = tester.newInstance( firstname:'tim', lastname:'yates' )
+ assert tim.firstname == 'tim'
// Check original copyWith remains
def result = tim.copyWith( 2 )
assert result.size() == 2
- assert result.first == [ 'tim', 'tim' ]
+ assert result.firstname == [ 'tim', 'tim' ]
}
// GROOVY-6293