Check.java: Pyret’s is, for Java

The file that makes Check.is work. Download it and keep it beside your own.

Download Check.java

It goes in the same folder as your own file. In IntelliJ IDEA that is src, beside Stripe.java. Do not edit it.

In main, one line per example, and Check.done() last:

Check.is(stripeWidth(10), 60);
Check.is(flagRow(1), "######......");
Check.done();

A check that fails prints what it got and what it expected. Check.done() prints Looks shipshape when every check passed.

On OneCompiler: add a file named Check.java and paste the whole of this one into it. Or open the class copy, which already has both files: https://onecompiler.com/java/4544z33u6.