This is an automated email from the ASF dual-hosted git repository. borinquenkid pushed a commit to branch test/document-datamapping-core-transformers in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 1d89657ddf9fa76a378dc7d0da78ca59b36df706 Author: Walter Duque de Estrada <[email protected]> AuthorDate: Thu Aug 13 11:28:46 2026 -0500 Add priority() coverage for DirtyCheckTransformation DirtyCheckTransformation's own visit() logic was already well covered by the extensive existing spec (its @DirtyCheck-driven normal path is exercised throughout), but priority() itself was never called directly. Add a one-line test for it. Coverage moves 58% -> 61% instruction. The two remaining uncovered branches (a malformed-astNodes defensive guard, and an annotation-type mismatch early-return) are unreachable through any real @DirtyCheck usage - the annotation's @Target(TYPE) restriction and Groovy's own local-transform dispatch guarantee those conditions can't occur, matching the same pattern already found in this branch's other local AST transform specs. Co-Authored-By: Claude Sonnet 5 <[email protected]> --- .../gorm/dirty/checking/DirtyCheckTransformationSpec.groovy | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/dirty/checking/DirtyCheckTransformationSpec.groovy b/grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/dirty/checking/DirtyCheckTransformationSpec.groovy index 839f73f853..9445c7a215 100644 --- a/grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/dirty/checking/DirtyCheckTransformationSpec.groovy +++ b/grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/dirty/checking/DirtyCheckTransformationSpec.groovy @@ -20,6 +20,8 @@ package org.grails.datastore.gorm.dirty.checking import grails.gorm.annotation.Entity import grails.gorm.dirty.checking.DirtyCheck +import org.apache.grails.common.compiler.GroovyTransformOrder +import org.grails.compiler.gorm.DirtyCheckTransformation import org.grails.datastore.mapping.dirty.checking.DirtyCheckable import spock.lang.PendingFeature import spock.lang.Specification @@ -29,6 +31,11 @@ import spock.lang.Issue * @author Graeme Rocher */ class DirtyCheckTransformationSpec extends Specification { + + void "priority orders the transform via DIRTY_CHECK_ORDER"() { + expect: + new DirtyCheckTransformation().priority() == GroovyTransformOrder.DIRTY_CHECK_ORDER + } @Issue('https://github.com/apache/grails-data-mapping/issues/894') void "Test transform doesn't make getters require static compilation"() { when:"A Dirty checkable class with generic types is parsed"
