FC18: Moved APL punction lookalike pair to cake pie layer candy ring

This commit is contained in:
Willem Cazander 2025-08-02 22:21:46 +02:00
parent 9e9ad6af19
commit e8771e6c6b
7 changed files with 111 additions and 49 deletions

View file

@ -0,0 +1,62 @@
/*
* Copyright (c) 2004-2014, Willem Cazander
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.x4o.fc18.cake2.pie9;
import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.x4o.fc18.FourCornerUnicodeDisplay;
import org.x4o.fc18.cake2.FourCornerDotCake;
public class FCDotPIE9Test {
String pieChars;
public FCDotPIE9Test() {
int pieStart = FourCornerDotCake.FC_PIE9C_01.getStart();
int pieStop = FourCornerDotCake.FC_PIE9D_27.getStop();
List<Integer> cakePoints = new ArrayList<>();
for (int i = pieStart; i <= pieStop; i++) {
cakePoints.add(i);
}
FourCornerUnicodeDisplay disp = FourCornerUnicodeDisplay.text();
StringBuilder buf = new StringBuilder();
buf.append(disp.renderFromInt18(cakePoints));
pieChars = buf.toString();
}
@Test
public void testUnusedMath() throws Exception {
int totalMissing = 0;
for (int i = 0x2200; i <= 0x22FF; i++) {
String mathChar = new StringBuilder().appendCodePoint(i).toString();
if (!pieChars.contains(mathChar)) {
totalMissing++;
//System.out.println(totalMissing + ":missing-math-chr: " + mathChar);
}
}
Assertions.assertTrue(totalMissing < 128, "To many math chars missing....");
}
}