FC18: Moved untested sand walker octals to escape sequence

This commit is contained in:
Willem Cazander 2025-08-13 22:07:53 +02:00
parent 2dc62e8f25
commit d176710f16
7 changed files with 145 additions and 79 deletions

View file

@ -28,6 +28,7 @@ import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.x4o.fc18.octal8.PrimordialOctal;
/**
* Tests FourCornerRecipe methods.
@ -37,6 +38,21 @@ import org.junit.jupiter.api.Test;
*/
public class FourCornerRecipeTest {
@Test
public void testSandWalker() throws Exception {
List<Integer> cdc = new ArrayList<>();
Assertions.assertThrows(IllegalArgumentException.class, () -> {
FourCornerRecipe.embedSandWalker(cdc, List.of(PrimordialOctal.PART_1));
});
List<PrimordialOctal> octalMine = new ArrayList<>();
for (int i=0;i<24;i++) {
octalMine.add(PrimordialOctal.PART_1);
}
FourCornerRecipe.embedSandWalker(cdc, octalMine);
String res = FourCornerUnicodeDisplay.text().renderFromInt18(cdc);
Assertions.assertTrue(res.endsWith("PART_1PART_1"), "missing " + res);
}
@Test
public void testNCRCount1024() throws Exception {
List<Integer> cdc = new ArrayList<>();