dplassgit / d2lang

D2 is a strongly-typed, statically-typed, (mostly) inferred-type compiled language.
MIT License
7 stars 0 forks source link

Make ExecutionSubject #329

Closed dplassgit closed 4 months ago

dplassgit commented 4 months ago

E.g., so we can write:

 assertThat(sourceCode).throwsRuntimeException("match");
 assertThat(sourceCode).throwsGenerateException("match");
 assertThat(sourceCode).compiledOutput().hasExitCode(-1).contains("foo");
 assertThat(sourceCode).withNoOptimization().compiledOutput().contains("foo");
 assertThat(sourceCode).interpretedOutput().isEqualTo("bar");
 assertThat(sourceCode).compiledOutputEqualsInterpreted();