Home /Examples/examples/java/README.md

README.md

examples/java/README.md · 31 line(s) · markdown

Java SE/JDK 28 conformance programs

These programs test the SLeeLa implementation of the JDK 28 API under lib/java. Each one calls the implementation, compares every result with the value Java SE returns for the same call, prints a FAIL line for each mismatch, and ends with a summary line.

ProgramCovers
JavaLangThrowableConformanceThrowable hierarchy: extends chain and instanceof, messages, cause, suppressed, real throw/catch
JavaLangMathConformancejava.lang.Math against IEEE reference doubles; addExact overflow throws
JavaLangIntegralConformanceInteger, Long, Short, Byte parse/format/bit operations, StrictMath
JavaLangFloatingConformanceDouble/Float toString, parse, bit views, hex strings, compare
JavaLangDoubleRoundTripDouble.toString then parseDouble round trip over 1,348 values from 1e-300 to 1e300
JavaLangCharacterConformanceCharacter classification, case mapping, surrogates; Boolean
JavaUtilCollectionsConformanceLists, deques, Stack, Vector, hash and tree maps and sets, PriorityQueue
JavaUtilUtilitiesConformanceArrays, Collections, Random (Java LCG sequences), Optional*, Objects

Run all of them:

examples/java/run-conformance.sh            # uses impl/build/sleela when built

To run one:

cd examples/java && SLEELA_HOME=../.. SLEELA_LIB=../../lib ../../impl/build/sleela run JavaUtilCollectionsConformance.sleela