< prev index next >

test/jdk/java/lang/reflect/records/RecordReflectionTest.java

Print this page

  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 /*
 25  * @test
 26  * @bug 8235369 8235550 8247444 8320575
 27  * @summary reflection test for records
 28  * @build R10
 29  * @compile RecordReflectionTest.java
 30  * @run testng/othervm RecordReflectionTest

 31  * @run testng/othervm/java.security.policy=allPermissions.policy RecordReflectionTest
 32  */
 33 
 34 import java.lang.annotation.*;
 35 import java.lang.reflect.*;
 36 import java.util.List;
 37 import org.testng.annotations.*;
 38 import static org.testng.Assert.*;
 39 
 40 @Test
 41 public class RecordReflectionTest {
 42 
 43     class NoRecord {}
 44 
 45     record R1() {}
 46 
 47     record R2(int i, int j) {}
 48 
 49     record R3(List<String> ls) {}
 50 

  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 /*
 25  * @test
 26  * @bug 8235369 8235550 8247444 8326879 8320575
 27  * @summary reflection test for records
 28  * @build R10
 29  * @compile RecordReflectionTest.java
 30  * @run testng/othervm RecordReflectionTest
 31  * @run testng/othervm --enable-preview RecordReflectionTest
 32  * @run testng/othervm/java.security.policy=allPermissions.policy RecordReflectionTest
 33  */
 34 
 35 import java.lang.annotation.*;
 36 import java.lang.reflect.*;
 37 import java.util.List;
 38 import org.testng.annotations.*;
 39 import static org.testng.Assert.*;
 40 
 41 @Test
 42 public class RecordReflectionTest {
 43 
 44     class NoRecord {}
 45 
 46     record R1() {}
 47 
 48     record R2(int i, int j) {}
 49 
 50     record R3(List<String> ls) {}
 51 
< prev index next >