Skip to content

test: ring-list shape tests moved in from macTEM - #38

Merged
Paullo9 merged 1 commit into
mainfrom
issue-79-macTEM-tests
Oct 30, 2026
Merged

Paullo9 merged 1 commit into
mainfrom
issue-79-macTEM-tests

Conversation

@Paullo9

@Paullo9 Paullo9 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Requested by Paul · project thread

Part of mac4DSTEM/macEM-suite#79 (the macTEM side removes its copies).

macTEM held five test files that test only this kit's API. For each test I checked whether the kit already runs it (most were ported at the kit split, under the same or a reference …-annotated name). Four were not covered, and move here as Tests/DiffractoScatteringTests/RingListShapeTests.swift, in Swift Testing:

  • metricToleranceKeepsNearCubicAndNearHexagonalCells: Laue class, metric family and ring count of cells 1e-11 to 1e-6 off cubic or hexagonal.
  • latticeRecognition: the six-parameter edges (beta 90 + 1e-10 orthorhombic, + 1e-8 monoclinic; alpha or gamma 1e-8 off triclinic; unique axes a and c).
  • lowerSymmetryCellsHaveRingsAndAnUnsupportedElementIsRefused: tetragonal 58 rings, orthorhombic 74, near-cubic 15, Z = 104 refused.
  • swapEquivalentReflectionsAreOneOrbitAndCoincidencesStayNamedByTheirOrbits: a = c, cos beta = -1/4 is mmm; 83 rings, 28 multi-orbit, {2 0 0} + {2 0 -1}, 698 reflections.

Already covered here, so not moved: testFamilyIntensityIsTheSumOverMembers (structure-factor pins), testFirstThatAppliesPairs (testVerdictOrder and ScatteringTruthTests.testRefusals), testOrbitSizesAndMultiplicity (RingIndexingTests), and every test of RingCalibrationTests, RingFitCalibrationTests and EllipseNoisyRingTests (same names in DiffractoGeometryTests).

Test-only: no number, API or fixture changes, so no CHANGELOG line beyond this title.

swift test -c release --parallel --skip DiffractoKitParityTests: green, RingListShapeTests 4 of 4.

🤖 Generated with Claude Code

Four tests an app held on the kit's ring lists, which the kit's own tests
did not cover: the metric family and Laue class of cells near a higher
symmetry, the six-parameter lattice recognition edges, the ring counts of
tetragonal and orthorhombic cells with the Z = 104 refusal, and the
monoclinic cell whose a<->c swap is a true symmetry (83 rings, 28 named by
several orbits, 698 reflections). No number changed.

Done: RingListShapeTests in DiffractoScatteringTests.
Next: the app drops its copies once this lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Paullo9 Paullo9 self-assigned this Oct 30, 2026
@Paullo9
Paullo9 merged commit 938731a into main Oct 30, 2026
6 checks passed
@Paullo9
Paullo9 deleted the issue-79-macTEM-tests branch October 30, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant