Skip to content

Improve test coverage related to 'bracket-terminal/consoles'#104

Open
neokkk wants to merge 1 commit into
utilForever:mainfrom
neokkk:enhance_terminal_console
Open

Improve test coverage related to 'bracket-terminal/consoles'#104
neokkk wants to merge 1 commit into
utilForever:mainfrom
neokkk:enhance_terminal_console

Conversation

@neokkk
Copy link
Copy Markdown
Contributor

@neokkk neokkk commented May 24, 2026

What

Added comprehensive unit tests for console implementations and shared test utilities across the console subsystem.

Included test coverage for:

  • Console trait default behavior
  • SimpleConsole
  • SparseConsole
  • FlexiConsole
  • SpriteConsole
  • VirtualConsole

Also added reusable TestConsole support utilities for validating trait default implementations and console semantics consistently across implementations.

Additionally, fixed a bug in VirtualConsole::from_text() line wrapping logic.

Why

The console subsystem had very limited implementation-specific test coverage despite containing a large amount of coordinate translation, clipping, sparse storage, rendering, and text layout logic.

While adding tests for VirtualConsole, an issue was discovered in VirtualConsole::from_text().

The wrapping logic previously used:

if newline.len() > width

which allowed a line to exceed the configured width before being flushed.

After correcting this to:

if newline.len() >= width

Another issue became visible: the implementation always pushed the remaining buffer after processing each input line, even when the buffer had already been flushed and was empty.

This produced unintended empty lines.

Example:

Input text:

"abc\ndef"

Width:

3

Expected logical lines:

["abc", "def"]

Previous behavior:

["abc", "", "def", ""]

Because:

  1. "abc" reached width 3 and was flushed immediately
  2. Newline became ""
  3. The implementation still unconditionally pushed the empty buffer

The implementation was updated to avoid appending empty trailing buffers after wrapping.

Checklist

Required

  • cargo check --all passes
  • cargo fmt --all -- --check passes
  • cargo clippy --workspace --all-targets -- -D warnings -A clippy::multiple-crate-versions passes
  • cargo test --all passes
  • I linked the related issue (for example: Closes #26)

Functional Validation

  • Behavior related to this change was verified locally (if applicable)
  • Rendering/backend behavior was verified when runtime code changed (if applicable)
  • Algorithm behavior (pathfinding/FOV/noise/random) was verified when affected (if applicable)
  • I added or updated tests for changed behavior (if applicable)

Configuration & Docs

  • User-facing docs were updated (README.md, ARCHITECTURE.md, or relevant manual pages, if applicable)
  • New dependencies/configuration are documented (if applicable)
  • No sensitive values or credentials were introduced

If Applicable

  • Security impact considered (run cargo audit locally if needed)
  • Breaking behavior changes are clearly described in this PR

Summary by CodeRabbit

  • Bug Fixes

    • Fixed text wrapping logic in virtual console from_text method to correctly handle line breaks and trailing content.
  • Tests

    • Added comprehensive unit test coverage for all console implementations (simple, flexible, sparse, sprite, and virtual consoles) with coordinate mapping, rendering, and bounds-checking validation.
    • Introduced test utilities and mocking support for improved test reliability.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 24, 2026

📝 Walkthrough

Walkthrough

This PR adds comprehensive unit test infrastructure and test coverage to bracket-terminal's console system. It introduces mockall and rstest dev dependencies, creates a TestConsole test utility, enables trait mocking on the Console trait, and adds parametrized unit tests to all console implementations. A bug fix to VirtualConsole::from_text line wrapping is also included.

Changes

Test Infrastructure and Utilities

Layer / File(s) Summary
Test dependencies and TestConsole utility
bracket-terminal/Cargo.toml, bracket-terminal/src/lib.rs, bracket-terminal/src/test_utils.rs
Add mockall and rstest dev dependencies; declare conditional test module; create TestConsole struct implementing the Console trait with stubs for rendering/output and real implementations for size queries, coordinate mapping, clipping, and downcasting.

Console Implementation Test Coverage

Layer / File(s) Summary
Console trait automocking and tests
bracket-terminal/src/consoles/console.rs
Enable #[cfg_attr(test, automock)] on Console trait; add parametrized in_bounds and try_at tests with no clipping, exact clipping rectangles, and oversized/negative-origin clipping scenarios.
SimpleConsole test coverage
bracket-terminal/src/consoles/simple_console.rs
Test initialization, bottom-origin coordinate mapping, print/print_color/set/set_bg with out-of-bounds clipping, region filling, text alignment, offset/scale behavior, clipping round-trip, alpha updates on all tiles, translation-mode glyph handling, buffer resizing with content preservation, dirty-flag reset, and as_any downcasting.
SparseConsole test coverage
bracket-terminal/src/consoles/sparse_console.rs
Test sparse tile initialization and coordinate mapping, print and colored text rendering with bounds clipping, per-cell set/set_bg operations, tile creation/update semantics, clearing and dirty flags, region filling, text alignment, colored text spans, offset/scale/clipping, alpha/translation behavior, resizing without tile rebuild, and downcasting.
FlexiConsole test coverage
bracket-terminal/src/consoles/flexible_console.rs
Test console initialization, bottom-origin coordinate mapping, sparse tile creation via print/print_color/set/set_fancy with bounds behavior, clearing semantics and background handling, region filling, text alignment, offset/scale/clipping setter behavior, alpha updates, translation-mode printing, resizing without tile changes, dirty-flag reset, and as_any downcasting.
SpriteConsole test coverage
bracket-terminal/src/consoles/sprite_console.rs
Test sprite sheet initialization, bottom-origin coordinate mapping, sprite appending and dirty-flag toggling, clearing sprite lists and ignoring background parameters, text/tile/draw method no-ops, xp_layer dimension export, fixed scaling/offset/clipping no-ops, alpha tinting applied only to sprite foreground, resize/dirty-flag tracking, and downcasting support.
VirtualConsole line wrapping fix and tests
bracket-terminal/src/consoles/virtual_console.rs
Fix from_text to break lines at >= width (not > width) and omit empty trailing lines; add tests for coordinate mapping, print/print_color/set/set_bg with clipping, region filling, text alignment, clipping round-trip, alpha updates, translation-mode handling, from_text wrapping correctness, ignored resize_pixels, unsupported method panics, clear_dirty, and as_any downcasting.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

size/XL

Suggested reviewers

  • utilForever

Poem

A rabbit hops through every console test,
With mockalls and rstests at its best,
From sparse to sprite, the coverage runs deep,
Each boundary and buffer stands the leap,
Now terminal code dreams safe and sound! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Improve test coverage related to bracket-terminal/consoles' accurately summarizes the main objective of adding comprehensive unit tests to console implementations.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (7)
bracket-terminal/src/consoles/flexible_console.rs (2)

731-731: ⚡ Quick win

Simplify unnecessarily complex expression.

The expression "".len() as i32 evaluates to 0. Replace it with the literal 0 for clarity.

♻️ Proposed fix
-        console.print("".len() as i32, 0, "AB");
+        console.print(0, 0, "AB");
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bracket-terminal/src/consoles/flexible_console.rs` at line 731, The call to
console.print uses the unnecessary expression "\"\".len() as i32" which always
equals 0; replace that expression with the literal 0 to improve clarity and
performance by changing console.print("".len() as i32, 0, "AB") to
console.print(0, 0, "AB") in the code path that invokes the print method (the
console.print call in flexible_console.rs).

496-502: ⚡ Quick win

Misleading test name.

The test name flexi_console_at_mapping_differs_from_test_console_row_major_mapping suggests a comparison with a TestConsole instance, but the test only verifies FlexiConsole's bottom-origin mapping behavior. Consider renaming to better reflect what's actually tested, e.g., at_uses_bottom_origin_unlike_row_major_mapping.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bracket-terminal/src/consoles/flexible_console.rs` around lines 496 - 502,
Rename the test function
flexi_console_at_mapping_differs_from_test_console_row_major_mapping to a name
that reflects it only verifies FlexiConsole's bottom-origin mapping (suggested:
at_uses_bottom_origin_unlike_row_major_mapping); update the test declaration
(the function name) and any references to it, keeping the body unchanged (uses
FlexiConsole::init and calls flexi.at(0, 0) and flexi.at(0, 3)).
bracket-terminal/src/test_utils.rs (1)

32-34: 💤 Low value

Consider adding debug assertions for coordinate bounds.

The at() method performs no bounds validation before calculating the index. While the Console trait doesn't require at() to check bounds (that's the role of in_bounds and try_at), adding a debug assertion would help catch test bugs earlier and make debugging easier.

🛡️ Optional: Add debug assertions
 fn at(&self, x: i32, y: i32) -> usize {
+    debug_assert!(
+        x >= 0 && x < self.size.0 as i32 && y >= 0 && y < self.size.1 as i32,
+        "at() called with out-of-bounds coordinates: ({}, {}) for console size {:?}",
+        x, y, self.size
+    );
     y as usize * self.size.0 as usize + x as usize
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bracket-terminal/src/test_utils.rs` around lines 32 - 34, Add a debug
assertion to the at(&self, x: i32, y: i32) -> usize method to validate
coordinates before computing the index; e.g., use debug_assert!(x >= 0 && y >= 0
&& x < self.size.0 && y < self.size.1) or call an existing in_bounds(x,y) helper
to assert bounds on self.size, then proceed to compute the index as before—this
will catch test bugs without changing release behavior.
bracket-terminal/src/consoles/sprite_console.rs (1)

324-330: 💤 Low value

Remove or enhance this redundant test.

This test is redundant with the parametrized at_uses_bottom_origin_storage test above, which already validates all the same coordinate mappings. The test name suggests it demonstrates how the mapping "differs from row-major," but it doesn't show what row-major mapping would produce or make any comparison.

Either remove this test or enhance it to actually demonstrate the difference (e.g., by showing what row-major y * width + x would produce vs. the bottom-origin formula).

♻️ Suggested fix: remove the redundant test
-    #[test]
-    fn sprite_console_at_mapping_differs_from_test_console_row_major_mapping() {
-        let sprite_console = SpriteConsole::init(10, 4, 0);
-
-        assert_eq!(sprite_console.at(0, 0), 30);
-        assert_eq!(sprite_console.at(0, 3), 0);
-    }
-
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bracket-terminal/src/consoles/sprite_console.rs` around lines 324 - 330, The
test function
sprite_console_at_mapping_differs_from_test_console_row_major_mapping is
redundant with the parametrized at_uses_bottom_origin_storage test; either
delete this test entirely, or modify it to explicitly compare bottom-origin
mapping to row-major by calling SpriteConsole::init(...) and using its at(x,y)
results vs the row-major formula (y * width + x) so the test asserts the
differing values; locate the test by its function name and the
SpriteConsole::init and at methods to update or remove accordingly.
bracket-terminal/src/consoles/sparse_console.rs (2)

460-466: 💤 Low value

Consider removing this redundant test.

This test duplicates coverage from the parameterized at_uses_bottom_origin_storage test above (lines 447-458), which already verifies at(0, 0) == 30 and at(9, 3) == 9 among other cases. The test name suggests a comparison with TestConsole, but no such comparison is present.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bracket-terminal/src/consoles/sparse_console.rs` around lines 460 - 466,
Remove the redundant unit test
sparse_console_at_mapping_differs_from_test_console_row_major_mapping (or
replace it with a real comparison) because its assertions are already covered by
the parameterized test at_uses_bottom_origin_storage; locate the test function
named sparse_console_at_mapping_differs_from_test_console_row_major_mapping and
delete its whole #[test] fn block (or alternatively rewrite it to actually
compare SparseConsole::at mapping against TestConsole::at if a distinct
comparison is required).

543-585: 💤 Low value

Consider verifying dirty flag behavior in set_bg tests.

The tests correctly validate tile creation and modification, but don't assert that is_dirty is set when set_bg modifies state (lines 544-574). While the implementation does set the dirty flag (line 153), explicit verification would improve test completeness.

Example assertion to add
 fn set_bg_updates_existing_tile_backgrounds_with_same_idx() {
     let mut console = SparseConsole::init(10, 4);
     let old_bg = rgba(1, 1, 1, 255);
     let new_bg = rgba(9, 8, 7, 6);

     console.set(2, 1, rgba(1, 2, 3, 4), old_bg, 65);
     console.set(2, 1, rgba(5, 6, 7, 8), old_bg, 66);
+    console.clear_dirty();
     console.set_bg(2, 1, new_bg);

+    assert!(console.is_dirty);
     assert_eq!(console.tiles.len(), 2);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bracket-terminal/src/consoles/sparse_console.rs` around lines 543 - 585, The
tests for set_bg (functions
set_bg_updates_existing_tile_backgrounds_with_same_idx,
set_bg_creates_space_tile_when_no_existing_tile_matches,
set_bg_ignores_out_of_bounds_coordinates) are missing assertions that the
console dirty flag is set when state changes; update each test that expects a
modification to assert console.is_dirty (or the appropriate dirty field) is true
after calling SparseConsole::set_bg, and ensure the out-of-bounds test asserts
the dirty flag remains false when no tiles were modified, referencing the
SparseConsole::set_bg method and the is_dirty field to locate the relevant
behavior to verify.
bracket-terminal/src/consoles/virtual_console.rs (1)

707-720: ⚡ Quick win

Consider adding explicit edge-case tests for the wrapping bug fix.

The test validates the overall wrapping behavior but doesn't explicitly document the specific edge cases mentioned in the PR description:

  1. Wrapping at exact width boundary (e.g., "abc" with width 3)
  2. Prevention of trailing empty lines when wrapping exhausts the buffer

While this test indirectly validates the fix (height is exactly 3, not 4+), an explicit test case would make the fix more self-documenting and prevent regression.

💡 Optional test to explicitly validate edge cases
#[test]
fn from_text_wraps_at_exact_width_and_omits_trailing_empty_lines() {
    // Edge case 1: Line exactly at width boundary
    let console = VirtualConsole::from_text("abc", 3);
    assert_eq!(console.height, 1);
    assert_eq!(console.tiles[console.at(0, 0)].glyph, 97);
    assert_eq!(console.tiles[console.at(2, 0)].glyph, 99);
    
    // Edge case 2: Wrapping that exhausts buffer (no trailing empty line)
    let console = VirtualConsole::from_text("abcd", 3);
    assert_eq!(console.height, 2);  // Should be ["abc", "d"], not ["abc", "d", ""]
    assert_eq!(console.tiles[console.at(0, 0)].glyph, 97);   // "abc" on y=0
    assert_eq!(console.tiles[console.at(0, 1)].glyph, 100);  // "d" on y=1
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bracket-terminal/src/consoles/virtual_console.rs` around lines 707 - 720, Add
explicit unit tests covering the two edge cases described: create new tests that
call VirtualConsole::from_text to assert (1) a line exactly equal to the width
(e.g., from_text("abc", 3)) yields height == 1 and correct glyphs at at(0,0) and
at(2,0), and (2) wrapping that fills a line and leaves a partial second line
without producing a trailing empty line (e.g., from_text("abcd", 3)) yields
height == 2 and glyphs at at(0,0) == 'a' and at(0,1) == 'd'; add these tests
alongside the existing from_text_wraps_lines_and_prints_content to make the
wrapping bug coverage explicit.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@bracket-terminal/src/consoles/flexible_console.rs`:
- Line 731: The call to console.print uses the unnecessary expression
"\"\".len() as i32" which always equals 0; replace that expression with the
literal 0 to improve clarity and performance by changing console.print("".len()
as i32, 0, "AB") to console.print(0, 0, "AB") in the code path that invokes the
print method (the console.print call in flexible_console.rs).
- Around line 496-502: Rename the test function
flexi_console_at_mapping_differs_from_test_console_row_major_mapping to a name
that reflects it only verifies FlexiConsole's bottom-origin mapping (suggested:
at_uses_bottom_origin_unlike_row_major_mapping); update the test declaration
(the function name) and any references to it, keeping the body unchanged (uses
FlexiConsole::init and calls flexi.at(0, 0) and flexi.at(0, 3)).

In `@bracket-terminal/src/consoles/sparse_console.rs`:
- Around line 460-466: Remove the redundant unit test
sparse_console_at_mapping_differs_from_test_console_row_major_mapping (or
replace it with a real comparison) because its assertions are already covered by
the parameterized test at_uses_bottom_origin_storage; locate the test function
named sparse_console_at_mapping_differs_from_test_console_row_major_mapping and
delete its whole #[test] fn block (or alternatively rewrite it to actually
compare SparseConsole::at mapping against TestConsole::at if a distinct
comparison is required).
- Around line 543-585: The tests for set_bg (functions
set_bg_updates_existing_tile_backgrounds_with_same_idx,
set_bg_creates_space_tile_when_no_existing_tile_matches,
set_bg_ignores_out_of_bounds_coordinates) are missing assertions that the
console dirty flag is set when state changes; update each test that expects a
modification to assert console.is_dirty (or the appropriate dirty field) is true
after calling SparseConsole::set_bg, and ensure the out-of-bounds test asserts
the dirty flag remains false when no tiles were modified, referencing the
SparseConsole::set_bg method and the is_dirty field to locate the relevant
behavior to verify.

In `@bracket-terminal/src/consoles/sprite_console.rs`:
- Around line 324-330: The test function
sprite_console_at_mapping_differs_from_test_console_row_major_mapping is
redundant with the parametrized at_uses_bottom_origin_storage test; either
delete this test entirely, or modify it to explicitly compare bottom-origin
mapping to row-major by calling SpriteConsole::init(...) and using its at(x,y)
results vs the row-major formula (y * width + x) so the test asserts the
differing values; locate the test by its function name and the
SpriteConsole::init and at methods to update or remove accordingly.

In `@bracket-terminal/src/consoles/virtual_console.rs`:
- Around line 707-720: Add explicit unit tests covering the two edge cases
described: create new tests that call VirtualConsole::from_text to assert (1) a
line exactly equal to the width (e.g., from_text("abc", 3)) yields height == 1
and correct glyphs at at(0,0) and at(2,0), and (2) wrapping that fills a line
and leaves a partial second line without producing a trailing empty line (e.g.,
from_text("abcd", 3)) yields height == 2 and glyphs at at(0,0) == 'a' and
at(0,1) == 'd'; add these tests alongside the existing
from_text_wraps_lines_and_prints_content to make the wrapping bug coverage
explicit.

In `@bracket-terminal/src/test_utils.rs`:
- Around line 32-34: Add a debug assertion to the at(&self, x: i32, y: i32) ->
usize method to validate coordinates before computing the index; e.g., use
debug_assert!(x >= 0 && y >= 0 && x < self.size.0 && y < self.size.1) or call an
existing in_bounds(x,y) helper to assert bounds on self.size, then proceed to
compute the index as before—this will catch test bugs without changing release
behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d54402ad-6a23-4f4a-8719-b2f65903600b

📥 Commits

Reviewing files that changed from the base of the PR and between fe7bf77 and f336a97.

📒 Files selected for processing (9)
  • bracket-terminal/Cargo.toml
  • bracket-terminal/src/consoles/console.rs
  • bracket-terminal/src/consoles/flexible_console.rs
  • bracket-terminal/src/consoles/simple_console.rs
  • bracket-terminal/src/consoles/sparse_console.rs
  • bracket-terminal/src/consoles/sprite_console.rs
  • bracket-terminal/src/consoles/virtual_console.rs
  • bracket-terminal/src/lib.rs
  • bracket-terminal/src/test_utils.rs
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: ✅ Check (ubuntu-latest)
  • GitHub Check: ✅ Check (windows-latest)
  • GitHub Check: ✅ Check (macos-latest)
  • GitHub Check: 🕸️ WASM Build
  • GitHub Check: 🧪 Test Suite
  • GitHub Check: 🚨 Lint
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: Format all Rust code using cargo fmt --all
Fix all cargo clippy warnings — the CI enforces -D warnings
Add tests for new functionality in the relevant module; for split domains, prefer colocated tests.rs

Files:

  • bracket-terminal/src/lib.rs
  • bracket-terminal/src/consoles/console.rs
  • bracket-terminal/src/consoles/sparse_console.rs
  • bracket-terminal/src/consoles/flexible_console.rs
  • bracket-terminal/src/test_utils.rs
  • bracket-terminal/src/consoles/virtual_console.rs
  • bracket-terminal/src/consoles/simple_console.rs
  • bracket-terminal/src/consoles/sprite_console.rs
🔇 Additional comments (39)
bracket-terminal/src/consoles/flexible_console.rs (10)

465-472: LGTM!


474-481: LGTM!


483-494: LGTM!


504-554: LGTM!


556-617: LGTM!


619-651: LGTM!


653-693: LGTM!


695-725: LGTM!


727-730: LGTM!

Also applies to: 732-755


757-794: LGTM!

bracket-terminal/src/lib.rs (1)

12-14: LGTM!

bracket-terminal/src/test_utils.rs (1)

1-145: LGTM!

bracket-terminal/src/consoles/console.rs (3)

7-8: LGTM!


31-31: LGTM!


214-308: LGTM!

bracket-terminal/Cargo.toml (1)

55-56: Confirm dev-dependency versions are current and show no known advisories

mockall = "0.14.0" and rstest = "0.26.1" match crates.io’s latest stable versions, and the security advisories query returned no vulnerabilities for either package.

bracket-terminal/src/consoles/sprite_console.rs (6)

287-298: LGTM!


300-309: LGTM!


311-322: LGTM!


332-372: LGTM!


374-438: LGTM!


440-528: LGTM!

bracket-terminal/src/consoles/sparse_console.rs (6)

428-445: LGTM!


468-515: LGTM!


587-653: LGTM!


655-711: LGTM!


713-765: LGTM!


767-792: LGTM!

bracket-terminal/src/consoles/simple_console.rs (7)

418-435: LGTM!


437-456: LGTM!


458-533: LGTM!


535-582: LGTM!


584-606: LGTM!


608-638: LGTM!


640-713: LGTM!

bracket-terminal/src/consoles/virtual_console.rs (4)

46-90: LGTM!


721-784: LGTM!


449-449: rstest 0.26.1 is current (latest stable on crates.io) — the crate’s latest stable version is 0.26.1, so the dependency in the tests aligns with the current release.


446-784: Ensure cargo fmt + cargo clippy gates pass for the new tests

cargo fmt --all -- --check / cargo clippy --workspace --all-targets -- -D warnings -A clippy::multiple_crate_versions couldn’t be executed here because rustup can’t select a Cargo version (no default toolchain configured). Please run these in CI or locally to confirm the test code complies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant