< 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
 27  * @summary reflection test for records
 28  * @compile RecordReflectionTest.java
 29  * @run testng/othervm RecordReflectionTest

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

  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
 27  * @summary reflection test for records
 28  * @compile RecordReflectionTest.java
 29  * @run testng/othervm RecordReflectionTest
 30  * @run testng/othervm --enable-preview 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 
< prev index next >