< prev index next >

test/langtools/tools/javac/sym/ElementStructureTest.java

Print this page
rev 59493 : imported patch 8244763-v2


 117  *
 118  * For example, to get the actual and expected output for 6 in /tmp/actual and /tmp/expected, respectively:
 119  *
 120  *     java ElementStructureTest generate-output $LANGTOOLS_DIR/make/data/symbols/include.list classes-6 6 /tmp/actual /tmp/expected
 121  */
 122 public class ElementStructureTest {
 123 
 124     static final byte[] hash6 = new byte[] {
 125         (byte) 0x99, (byte) 0x34, (byte) 0x82, (byte) 0xCF,
 126         (byte) 0xE0, (byte) 0x53, (byte) 0xF3, (byte) 0x13,
 127         (byte) 0x4E, (byte) 0xCF, (byte) 0x49, (byte) 0x32,
 128         (byte) 0xB7, (byte) 0x52, (byte) 0x0F, (byte) 0x68
 129     };
 130     static final byte[] hash7 = new byte[] {
 131         (byte) 0x3C, (byte) 0x03, (byte) 0xEA, (byte) 0x4A,
 132         (byte) 0x62, (byte) 0xD2, (byte) 0x18, (byte) 0xE5,
 133         (byte) 0xA5, (byte) 0xC2, (byte) 0xB7, (byte) 0x85,
 134         (byte) 0x90, (byte) 0xFA, (byte) 0x98, (byte) 0xCD
 135     };
 136     static final byte[] hash8 = new byte[] {
 137         (byte) 0x0B, (byte) 0xEB, (byte) 0x16, (byte) 0xF5,
 138         (byte) 0x7F, (byte) 0xB0, (byte) 0x18, (byte) 0xF1,
 139         (byte) 0x78, (byte) 0x11, (byte) 0xED, (byte) 0x30,
 140         (byte) 0x19, (byte) 0x4D, (byte) 0xDE, (byte) 0x8A
 141     };
 142 
 143     final static Map<String, byte[]> version2Hash = new HashMap<>();
 144 
 145     static {
 146         version2Hash.put("6", hash6);
 147         version2Hash.put("7", hash7);
 148         version2Hash.put("8", hash8);
 149     }
 150 
 151     public static void main(String... args) throws Exception {
 152         if (args.length == 0) {
 153             new ElementStructureTest().doTest();
 154             return ;
 155         }
 156         switch (args[0]) {
 157             case "generate-hashes":
 158                 new ElementStructureTest().generateHashes(args);
 159                 break;
 160             case "generate-output":




 117  *
 118  * For example, to get the actual and expected output for 6 in /tmp/actual and /tmp/expected, respectively:
 119  *
 120  *     java ElementStructureTest generate-output $LANGTOOLS_DIR/make/data/symbols/include.list classes-6 6 /tmp/actual /tmp/expected
 121  */
 122 public class ElementStructureTest {
 123 
 124     static final byte[] hash6 = new byte[] {
 125         (byte) 0x99, (byte) 0x34, (byte) 0x82, (byte) 0xCF,
 126         (byte) 0xE0, (byte) 0x53, (byte) 0xF3, (byte) 0x13,
 127         (byte) 0x4E, (byte) 0xCF, (byte) 0x49, (byte) 0x32,
 128         (byte) 0xB7, (byte) 0x52, (byte) 0x0F, (byte) 0x68
 129     };
 130     static final byte[] hash7 = new byte[] {
 131         (byte) 0x3C, (byte) 0x03, (byte) 0xEA, (byte) 0x4A,
 132         (byte) 0x62, (byte) 0xD2, (byte) 0x18, (byte) 0xE5,
 133         (byte) 0xA5, (byte) 0xC2, (byte) 0xB7, (byte) 0x85,
 134         (byte) 0x90, (byte) 0xFA, (byte) 0x98, (byte) 0xCD
 135     };
 136     static final byte[] hash8 = new byte[] {
 137         (byte) 0x24, (byte) 0x38, (byte) 0x52, (byte) 0x1C,
 138         (byte) 0x5E, (byte) 0x83, (byte) 0x82, (byte) 0xE6,
 139         (byte) 0x41, (byte) 0xC2, (byte) 0xDD, (byte) 0x2A,
 140         (byte) 0xFD, (byte) 0xFF, (byte) 0x5E, (byte) 0x2F
 141     };
 142 
 143     final static Map<String, byte[]> version2Hash = new HashMap<>();
 144 
 145     static {
 146         version2Hash.put("6", hash6);
 147         version2Hash.put("7", hash7);
 148         version2Hash.put("8", hash8);
 149     }
 150 
 151     public static void main(String... args) throws Exception {
 152         if (args.length == 0) {
 153             new ElementStructureTest().doTest();
 154             return ;
 155         }
 156         switch (args[0]) {
 157             case "generate-hashes":
 158                 new ElementStructureTest().generateHashes(args);
 159                 break;
 160             case "generate-output":


< prev index next >