Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void testApp() {
- List<String> codeTxt = List.of("A3,B5,C1", "A3", "A4,D1,A3,14", "Z2,C1,Z3,13,52", "B3,C4,D1,56","A3,H2,J1,41,61,51");
- List<String> decodeTxt = List.of("AAABBBBBC", "AAA", "AAAADAAA1111", "ZZCZZZ11155", "BBBCCCCD555555","AAAHHJ465");
- System.out.println("============== DECODE TEST ===============");
- for (int i = 0; i < codeTxt.size(); i++) {
- String decode = decodeTxt.get(i);
- String encode = codeTxt.get(i);
- System.out.println(encode + " -> " + decode + " - " + (decode(encode).equals(decode)));
- }
- System.out.println("============== ENCODE TEST ===============");
- for (int i = 0; i < codeTxt.size(); i++) {
- String decode = decodeTxt.get(i);
- String encode = codeTxt.get(i);
- System.out.println(decode + " -> " + encode + " - " + (encode(decode).equals(encode)));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement