Repository navigation
Improved test coverage - #16
Merged
Merged
Conversation
A new test file aimed at branch (C1) coverage: each NULL argument of the row, resource and block-settings functions and of decode_mask on its own; counts at the edge of overflow (a size_t count past UINT32_MAX, 0xFFFFFFFF guides, 0xFFFFFFFF UTF-16 units); empty lists, cursors outside a list, buffers one byte short; the float helpers at infinity, NaN and DBL_MAX, and channel ids mapped to slots at the limits. Branches 95.7% -> 96.9%; builders.h, views.h, detail/floats.h at 100%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019egXEpyVAm2D3tvQn2Xcuv
…r's untaken branches Files built with the reader tests' PSD builder (malformed ones are made in code, as the others are) and documents with crafted kept bytes: - reader: pixel aspect ratios that are not positive (0, -1, inf, NaN) and a duplicate 1064; bitmap at 8 bits and greyscale at 1 bit; a composite alpha without its channel; a stored composite short of colour channels; layers and masks without height or width; a mask that does not decode, and the same asked for no rows; channel data past the layer info; a PSB layer taller than any format allows; multichannel filling every plane; a fully transparent 32-bit pixel un-matted; 'Mtrn'/'Mt16' and a short tail - writer: a kept resource name without data, an inverted mask, 32-bit greyscale, multichannel given pixels or no channel count, a kept tail ending in stray bytes (8BIM, 8B64, a cut PSB long-key header) kept or converted, and a kept 'lsct' too short for its type Branches 96.9% -> 98.2% (read.h 92% -> 97%, reader.h 97% -> 99%, writer.h 95% -> 96%); clean under clang-tidy and AddressSanitizer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019egXEpyVAm2D3tvQn2Xcuv
…om the test report - writer: mpsd__alpha_uncounted no longer repeats the flat-mode check composite_alpha makes - read: minipsd_read's alignment check is reachable with a MINIPSD_MALLOC that aligns less than malloc; documented (header, SPECIFICATION, MANUAL, CHANGELOG) and tested in test_alloc_failure.cpp - reader: comments on the window's base and on next_layer's guard; init's doc says later data is checked as it is read - tests: GoogleTest pinned by hash; targetOf takes 32 bits; offline note in CHEATSHEET - ci: branch coverage threshold 95 -> 97 % (98.3 % measured) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- writer: clang-analyzer 22 (CI's) took the mask channel's source for a layer without a mask, after the crafted writer tests; mpsd__channel_count counts that channel only with a mask, so the finding is suppressed with that reason - ci: the C++ compile checks' (*_check.cpp, built, never run) coverage data left out, as the C units' are: their functions, never called, listed beside the tests' under their C names (functions 85 -> 100 %) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fruits of claude --cloud 100$ session included credits. Improved test coverage.