(String[] args)
| 52 | System.out.println(set); |
| 53 | } |
| 54 | public static void main(String[] args) { |
| 55 | test(new HashSet<>(), HashType::new); |
| 56 | test(new LinkedHashSet<>(), HashType::new); |
| 57 | test(new TreeSet<>(), TreeType::new); |
| 58 | // Things that don't work: |
| 59 | test(new HashSet<>(), SetType::new); |
| 60 | test(new HashSet<>(), TreeType::new); |
| 61 | test(new LinkedHashSet<>(), SetType::new); |
| 62 | test(new LinkedHashSet<>(), TreeType::new); |
| 63 | try { |
| 64 | test(new TreeSet<>(), SetType::new); |
| 65 | } catch(Exception e) { |
| 66 | System.out.println(e.getMessage()); |
| 67 | } |
| 68 | try { |
| 69 | test(new TreeSet<>(), HashType::new); |
| 70 | } catch(Exception e) { |
| 71 | System.out.println(e.getMessage()); |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | /* Output: |
| 76 | [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] |
nothing calls this directly
no test coverage detected