Repository navigation
The small libraries' tests check what they say they check - #450
Merged
Merged
Conversation
The Catch2 conversion kept these as TUT had them; now they are fixed: - lljoint: after addChild, a check repeated an earlier one where it meant that lljoint's parent is now lljointgp. It checks that. - llcharacter: a joint's parent, and a motion findMotion found, were dereferenced unchecked. Each is REQUIREd first, so a failure fails the case rather than crashing the run. - llpose: a case said an unnumbered joint is left out of the motion's joint signature and never looked. ALTestMotion exposes the signature, and the case checks that no byte of it is set; LLMotion writing one at joint number -1 would set the last byte of the row before. - llmultigesture: the sound step's flags were never read back, and the read-back case looked at two of four steps. Every field of every step is now compared with what was written, and the sample gesture's sound and chat steps carry flags, so a reader that skipped them would show. - llbvhloader: results were indexed with no joint count checked first; each is REQUIREd now. One case said every joint is given the global priority and looked at one. Two refusals shared a message. - llkeyframemotion: a U32 cursor was compared through LLSDEquals, as TUT's overload for a string message chose; it is compared as the integer it is. Each new or corrected check was shown to fail under a small change to the test's own input or expected value, and to pass as written. All of llcharacter_tests passes in 10 random orders: 38,119 assertions in 143 cases (38,083 before). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- alxmllayermerge: the check that an observer hears nothing once it is
gone looked at an observer never installed, so it could not fail. It
checks the one that was installed and then removed.
- llcontrol: the listener flag was a static never reset, so a second
run of the case in one process passed whether or not the listener
fired. It is the fixture's, set by a lambda.
- llpermissions:
- the allowCopyBy case called allowModifyBy;
- allowModifyBy, allowCopyBy and allowMoveBy were asked only under
the default masks, where everyone may. Each case now gives the
owner, the group and everyone their own masks in turn, and asks the
owner, a member as the group, the same member without it, and a
stranger. Modify stays refused to everyone, which fix() enforces;
- a getValue(PERM_TRANSFER) result was thrown away. The transfer
value is checked after each aggregate.
- inventorymisc: three fromLLSD results were never checked, and a case
left as a placeholder for a removed XML export asserted nothing and
goes.
- llsaleinfo: a sale info was built and never used; the lookup now goes
through it. The placeholder for message packing becomes a round trip
through packMessage and unpackMessage's LLSD forms, which need no
message system.
- llsettingssky: two profiles were indexed with no size checked.
- lluserrelations loses a commented-out TUT stub. Six files' @file
lines gave their TUT-era names.
Each new or corrected check was shown to fail under a small change to the
test's own input or expected value; inventorymisc's parse checks cannot
be made to, since LLInventoryItem::fromLLSD returns true whatever it is
given. llxml_tests passes 223 assertions in 25 cases, and
llinventory_tests 378 in 57 (356 in 58 before), in 10 random orders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…heck
- llgltfmaterial:
- the texture-transforms-only material was given texture ids, so its
JSON round trip was never tested; it is given transforms;
- the block meant to show that flagged default overrides put a
non-default material back set the override material twice and left
the render material default. It sets the render material. A third
block shows that the same defaults without the flags change
nothing;
- a comment pointed at "test<12>"; it names the case.
- llmaterial: the case named for fromLLSD invalidating the hash cache
could not fail for that reason: the cache was dirty already when
fromLLSD ran, and its last check went through a setter. The hash is
cached before each fromLLSD now, and the second goes through LLSD.
- llprimitive: createPrimitive's result leaked; a unique_ptr holds it.
- llimageworker: the responder's done flag was a plain bool written on
a worker thread and polled on the main one, through a pointer into the
test's stack that a responder finishing after the timeout would write
through. It is an atomic the responder shares ownership of.
- lldir: comments in the directory scan case named directories and
patterns the code does not use.
Each new or corrected check was shown to fail under a small change to the
test's own input or expected value. llprimitive_tests passes 335
assertions in 45 cases (333 before), and with llprimitive_test,
llimageworker_test and llfilesystem_tests passes in 10 random orders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 of 9 tasks
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.
Description
Fixes the bugs in the small libraries' own tests that the Catch2 conversion in #449 found and kept, since a conversion must not change what a test does. Each was a test that could not fail for the reason it existed, checked something other than what it said, could crash where it should fail, or leaked. None of the corrected tests found a bug in the code they test.
It stacks on #449 (
rye/tests-tm18) and changes only test files.llcharacter (d241423)
addChild, a check repeated an earlier one. It now checks the parent it meant.findMotionfound, were dereferenced unchecked. Each is now REQUIREd first.LLSDEquals; it is now compared as an integer.llxml and llinventory (741c56e)
allowCopyBycase calledallowModifyBy;allow*Bycases were asked only under the default masks, where everyone may. They now give the owner, the group and everyone masks of their own in turn, and ask the owner, a member asking as the group, the same member without it, and a stranger;fromLLSDresults were never checked. An empty placeholder case for a removed XML export goes.packMessageandunpackMessage.@filelines lose their TUT-era names.llprimitive, llimage and lldir (4b5331b)
fromLLSDinvalidating the hash cache could not fail for that reason. The cache was already dirty whenfromLLSDran.createPrimitive's result leaked.Related Issues
Issue Link: none. The bugs were found by #449's idiom pass and listed in 3bbc58d's message.
Checklist
Additional Notes
LLInventoryItem::fromLLSDreturns true whatever it is given.LLGLTFMaterial::applyOverridecallsmTrackingIdToLocalTexture.insert(it, it). That isstd::map's range insert over an empty range, so an override's local-texture tracking is never merged in. It is production code and wants its own change.🤖 Generated with Claude Code