MCPcopy Create free account
hub / github.com/QuiltMC/chasm / testSwitch

Method testSwitch

chasm/src/testData/java/other/ExampleClass.java:46–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 }
45
46 public static String testSwitch() {
47 return switch ((int) Math.round(Math.random() * 100)) {
48 case 10 -> {
49 String nested = "Test";
50 yield switch (nested) {
51 case "NotTest" -> "NotTest";
52 default -> throw new IllegalStateException("Unexpected value: " + "Test");
53 };
54 }
55 default -> "Not 10";
56 };
57 }
58
59 public static int testGenerics() throws ExecutionException, InterruptedException {
60 int output = CompletableFuture.supplyAsync(() -> 5)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected