Add unit tests for MathObjects (Value.pm, Parser.pm, and subclasses). - #1495
Open
drgrice1 wants to merge 1 commit into
Open
Add unit tests for MathObjects (Value.pm, Parser.pm, and subclasses).#1495drgrice1 wants to merge 1 commit into
drgrice1 wants to merge 1 commit into
Conversation
Covers previously untested or thinly-tested classes: Complex, Vector, Point, Set, Union, String, AbsoluteValue, and Matrix linear algebra methods (det, inverse, trace, norms, solve, order, power), plus Parser.pm error paths for malformed expressions and differentiation of formulas with units. Also fixes Value::Interval::D, Value::Set::D, and Value::Union::D in Differentiation.pm, which each had two extra leftover `shift` calls before `my $self = shift`, so $self was bound to the wrong argument (or undef) instead of the invocant, breaking the "can't differentiate" error methods. This is covered by the new differentiation.t tests. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
somiaj
approved these changes
Aug 11, 2026
somiaj
left a comment
Contributor
There was a problem hiding this comment.
All tests passed except for skipped rserv here (don't have that setup).
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.
Covers previously untested or thinly-tested classes: Complex, Vector, Point, Set, Union, String, AbsoluteValue, and Matrix linear algebra methods (det, inverse, trace, norms, solve, order, power), plus Parser.pm error paths for malformed expressions and differentiation of formulas with units.
Also fixes Value::Interval::D, Value::Set::D, and Value::Union::D in Differentiation.pm, which each had two extra leftover
shiftcalls beforemy $self = shift, so $self was bound to the wrong argument (or undef) instead of the invocant, breaking the "can't differentiate" error methods. This is covered by the new differentiation.t tests.I wrote the
absolute_value.tanddifferentiation.ttests and fixed the issue inlib/Parser/Differentiation.pma long time ago. I asked Claude to add some more unit tests for better MathObject test coverage. This is one of the things that AI is quite good at.