You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2021/12/26 17:10:09 UTC
[groovy] branch GROOVY_3_0_X updated: GROOVY-7482: add test case
This is an automated email from the ASF dual-hosted git repository.
emilles pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
new da9e69a GROOVY-7482: add test case
da9e69a is described below
commit da9e69a29e14c0051a6ec8d30e11de6f65afcc80
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Sun Dec 26 11:10:02 2021 -0600
GROOVY-7482: add test case
---
.../groovy/tools/stubgenerator/Groovy7482.groovy | 54 ++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/src/test/org/codehaus/groovy/tools/stubgenerator/Groovy7482.groovy b/src/test/org/codehaus/groovy/tools/stubgenerator/Groovy7482.groovy
new file mode 100644
index 0000000..cd87f4a
--- /dev/null
+++ b/src/test/org/codehaus/groovy/tools/stubgenerator/Groovy7482.groovy
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.codehaus.groovy.tools.stubgenerator
+
+final class Groovy7482 extends StringSourcesStubTestCase {
+
+ @Override
+ Map<String, String> provideSources() {
+ [
+ 'A.java': '''
+ abstract class A {
+ private Object getProperty(String name) {
+ return null;
+ }
+ }
+ ''',
+
+ 'C.groovy': '''
+ class C extends A {
+ }
+ ''',
+
+ 'Main.java': '''
+ public class Main {
+ public static void main(String[] args) {
+ new C();
+ }
+ }
+ '''
+ ]
+ }
+
+ @Override
+ void verifyStubs() {
+ String stub = stubJavaSourceFor('C')
+ assert !stub.contains('getProperty')
+ }
+}