package org.shedlang.compiler.testing; public record ExecutionResult(int exitCode, String stdout, String stderr) { public ExecutionResult throwOnError() { if (exitCode == 0) { return this; } else { throw new AssertionError("exit code was " + exitCode + "\nstdout:\n" + stdout + "\nstderr:\n" + stderr); } } }