Skip to content

Comments

TEST: Create unit tests for all classes where possible#38

Open
imikejackson wants to merge 4 commits intoBlueQuartzSoftware:developfrom
imikejackson:topic/unit_test_enhancements
Open

TEST: Create unit tests for all classes where possible#38
imikejackson wants to merge 4 commits intoBlueQuartzSoftware:developfrom
imikejackson:topic/unit_test_enhancements

Conversation

@imikejackson
Copy link
Collaborator

No description provided.

imikejackson and others added 2 commits February 20, 2026 16:52
Add comprehensive Catch2 unit tests for:
- Matrix3X1<T>: construction, dot, cross, magnitude, normalize, sortAscending, cosTheta, operators (20 tests)
- Matrix3X3<T>: construction, multiply, transpose, determinant, invert, adjoint, col/row, DirectStructureMatrix (23 tests)
- ArrayHelpers<T,K>: splat, multiply, scalarMultiply, scalarDivide, sum, sumofSquares, maxval, absValue, power (13 tests)
- EbsdDataArray<T>: CreateArray, FromStdVector, CopyFromPointer, get/set, components, resize, erase, deepCopy, copyFromArray (23 tests)
- EbsdStringUtils: split (single/multi delimiter, consecutive), specific_split, replace, ltrim, rtrim, trimmed, chop, number, simplified (18 tests)
- EbsdTransform: IdentifyStandardTransformation for TSL, HKL, HEDM, and unknown parameters (6 tests)
- EbsdLibRandom: seeded deterministic output, range checks for real1/real2/real3/res53/int31, init_by_array (9 tests)
- OrientationMath: MetricTensor, RootTensor, Miller-Bravais conversions with round-trip verification (12 tests)

Also documents newly discovered Bug BlueQuartzSoftware#5: EbsdDataArray::eraseTuples() does not update m_NumTuples.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
-BlueQuartzSoftware#21)

Add 80 new test cases across 9 test files covering ColorTable/ColorUtilities,
LambertUtilities, ModifiedLambertProjection, ComputeStereographicProjection,
TexturePreset, AngPhase/CtfPhase/EspritPhase, LaueOps subclasses,
ModifiedLambertProjection3D, and OrientationTransformation known-value tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@imikejackson imikejackson force-pushed the topic/unit_test_enhancements branch from 38743f2 to 0f4e61a Compare February 20, 2026 21:52
…lueQuartzSoftware#28) and fix ToolTipGenerator bug

Add 44 new test cases covering ToolTipGenerator, PoleFigureData, CanvasUtilities,
ModifiedLambertProjectionArray, PoleFigureUtilities, and TiffWriter. Fix bug in
ToolTipGenerator::generateHTML() and rowToHTML() where both methods returned an
empty string instead of the stringstream content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@imikejackson imikejackson force-pushed the topic/unit_test_enhancements branch 2 times, most recently from 48ddf02 to 3b49598 Compare February 21, 2026 00:03
M_PI is not defined on Windows without _USE_MATH_DEFINES. Use the
project's own constant to ensure cross-platform compilation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@imikejackson imikejackson force-pushed the topic/unit_test_enhancements branch from 3b49598 to 01fd2d8 Compare February 23, 2026 18:49
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