You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2023/01/12 18:04:08 UTC

[groovy] branch master updated: Fix the failing build

This is an automated email from the ASF dual-hosted git repository.

sunlan 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 ee83e1d498 Fix the failing build
ee83e1d498 is described below

commit ee83e1d498e787cbf7e20a2eefbecf978e2834c9
Author: Daniel Sun <su...@apache.org>
AuthorDate: Fri Jan 13 02:03:55 2023 +0800

    Fix the failing build
---
 .../runtime/ArrayGroovyMethodsSTCTest.groovy       | 24 +++++++++++++++++++-
 .../groovy/runtime/ArrayGroovyMethodsTest.groovy   | 26 ----------------------
 2 files changed, 23 insertions(+), 27 deletions(-)

diff --git a/src/test/org/codehaus/groovy/runtime/ArrayGroovyMethodsSTCTest.groovy b/src/test/org/codehaus/groovy/runtime/ArrayGroovyMethodsSTCTest.groovy
index 266c61cd2e..ff7f3889d8 100644
--- a/src/test/org/codehaus/groovy/runtime/ArrayGroovyMethodsSTCTest.groovy
+++ b/src/test/org/codehaus/groovy/runtime/ArrayGroovyMethodsSTCTest.groovy
@@ -19,7 +19,6 @@
 package org.codehaus.groovy.runtime
 
 import groovy.transform.stc.StaticTypeCheckingTestCase
-
 /**
  * STC Tests for ArrayGroovyMethods
  */
@@ -81,4 +80,27 @@ class ArrayGroovyMethodsSTCTest extends StaticTypeCheckingTestCase {
         '''
     }
 
+    void testAsBooleanForNullBooleanArray() {
+        assertScript '''
+        @groovy.transform.CompileStatic
+        def method() {
+            boolean[] array = null
+            assert !array.asBoolean()
+        }
+
+        method()
+        '''
+    }
+
+    void testAsBooleanForNullByteArray() {
+        assertScript '''
+        @groovy.transform.CompileStatic
+        def method() {
+            byte[] array = null
+            assert !array.asBoolean()
+        }
+
+        method()
+        '''
+    }
 }
diff --git a/src/test/org/codehaus/groovy/runtime/ArrayGroovyMethodsTest.groovy b/src/test/org/codehaus/groovy/runtime/ArrayGroovyMethodsTest.groovy
index bcdb1d3983..e25c673b0b 100644
--- a/src/test/org/codehaus/groovy/runtime/ArrayGroovyMethodsTest.groovy
+++ b/src/test/org/codehaus/groovy/runtime/ArrayGroovyMethodsTest.groovy
@@ -62,32 +62,6 @@ class ArrayGroovyMethodsTest {
         assertUnsupportedOperationForAllPrimitiveEmptyArrays('tail')
     }
 
-    @Test
-    void testAsBooleanForNullBooleanArray() {
-        assertScript '''
-        @groovy.transform.CompileStatic
-        def method() {
-            boolean[] array = null
-            assert !array.asBoolean()
-        }
-
-        method()
-        '''
-    }
-
-    @Test
-    void testAsBooleanForNullByteArray() {
-        assertScript '''
-        @groovy.transform.CompileStatic
-        def method() {
-            byte[] array = null
-            assert !array.asBoolean()
-        }
-
-        method()
-        '''
-    }
-
     private static assertUnsupportedOperationForAllPrimitiveEmptyArrays(String method) {
         assertUnsupportedOperationForGivenPrimitiveEmptyArrays(method,
             ['boolean', 'byte', 'char', 'short', 'int', 'long', 'float', 'double'])