Testing - Add unit tests for PLib functionality#705
Merged
dpasukhi merged 2 commits intoOpen-Cascade-SAS:IRfrom Sep 7, 2025
Merged
Testing - Add unit tests for PLib functionality#705dpasukhi merged 2 commits intoOpen-Cascade-SAS:IRfrom
dpasukhi merged 2 commits intoOpen-Cascade-SAS:IRfrom
Conversation
Member
dpasukhi
commented
Sep 7, 2025
- Introduced comprehensive unit tests for the Jacobi polynomial implementation in PLib, covering constructors, edge cases, Gauss integration points, weights, and basis function evaluations.
- Added tests for basic utility functions in PLib, including pole conversion and binomial coefficient calculations.
- Implemented checks for Hermite interpolation and polynomial evaluation with derivatives.
- Enhanced error handling and edge case testing for small and large coefficients.
- Initialized MaxError in PLib_DoubleJacobiPolynomial to ensure consistent behavior during degree reduction.
- Introduced comprehensive unit tests for the Jacobi polynomial implementation in PLib, covering constructors, edge cases, Gauss integration points, weights, and basis function evaluations. - Added tests for basic utility functions in PLib, including pole conversion and binomial coefficient calculations. - Implemented checks for Hermite interpolation and polynomial evaluation with derivatives. - Enhanced error handling and edge case testing for small and large coefficients. - Initialized MaxError in PLib_DoubleJacobiPolynomial to ensure consistent behavior during degree reduction.
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive unit tests for the PLib (polynomial library) functionality in OCCT, testing various polynomial classes and utility functions. The PR introduces test coverage for Jacobi polynomials, Hermite-Jacobi polynomials, double Jacobi polynomials, and basic PLib utilities.
Key changes include:
- Four new comprehensive test files covering different polynomial classes and utility functions
- Initialization fix for MaxError in PLib_DoubleJacobiPolynomial to ensure consistent behavior
- Updates to the build configuration to include the new test files
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/FoundationClasses/TKMath/PLib/PLib_DoubleJacobiPolynomial.cxx | Adds MaxError initialization to prevent undefined behavior during degree reduction |
| src/FoundationClasses/TKMath/GTests/PLib_Test.cxx | Comprehensive tests for basic PLib utility functions including pole conversion, binomial coefficients, and polynomial evaluation |
| src/FoundationClasses/TKMath/GTests/PLib_JacobiPolynomial_Test.cxx | Tests for Jacobi polynomial implementation covering constructors, basis functions, and error estimation |
| src/FoundationClasses/TKMath/GTests/PLib_HermitJacobi_Test.cxx | Tests for Hermite-Jacobi polynomials including derivative evaluations and coefficient conversion |
| src/FoundationClasses/TKMath/GTests/PLib_DoubleJacobiPolynomial_Test.cxx | Tests for double Jacobi polynomials covering 2D polynomial operations and degree reduction |
| src/FoundationClasses/TKMath/GTests/FILES.cmake | Updates build configuration to include the new test files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.