Skip to content

Conversation

@alienx5499
Copy link
Contributor

Description

This PR updates the crypto-square exercise test cases to sync with the latest problem-specifications, contributing to issue #775 for updating test cases across exercises.

Changes Made

  • Replaced outdated test case: Updated from "7 chunks" to "8 chunks" test case
  • Updated test UUID: Changed from fbcb0c6d-4c39-4a31-83f6-c473baa6af80 to 33fd914e-fa44-445b-8f38-ff8fbc9fe6e6
  • Synced with problem-specifications: Used configlet tool to ensure canonical data alignment
  • Test case description: "54 character plaintext results in 8 chunks, the last two with trailing spaces"

Files Modified

  • exercises/practice/crypto-square/.meta/tests.toml
  • exercises/practice/crypto-square/crypto_square_test.cpp

Screenshots

Before Changes

Screenshot 2025-07-07 at 12 36 54 PM

After Changes

Screenshot 2025-07-07 at 12 37 47 PM

Test Execution

image

Code Changes

image

Testing Instructions

To verify these changes work correctly:

# Navigate to the crypto-square exercise
cd exercises/practice/crypto-square

# Copy example implementation for testing
cp .meta/example.h crypto_square.h
cp .meta/example.cpp crypto_square.cpp

# Build with all tests enabled
cmake -DEXERCISM_RUN_ALL_TESTS=ON .
make

# Run tests with detailed output
./crypto-square -s

# Expected: All 8 test cases should pass, including the new "8 chunks" test

# Clean up
git restore crypto_square.h crypto_square.cpp
cd ../../..

Expected Test Output

image

Verification

✅ All 8 test cases pass
✅ New test case properly validates 54-character plaintext
✅ Configlet sync confirms no missing test cases for crypto-square
✅ Exercise maintains backward compatibility

Configlet Verification

Screenshot 2025-07-07 at 12 37 47 PM

Technical Details

  • Used configlet sync --tests include --update --yes -e crypto-square to automatically sync test cases
  • The old test case is marked as include = false in tests.toml
  • New test case includes reimplements reference to show it replaces the old one
  • Test logic and expected output remain unchanged, only UUID and description updated

File Diffs

image

Progress on Issue #775

This completes crypto-square exercise updates. Remaining exercises with missing test cases:

  • grade-school (16 missing)
  • largest-series-product (2 missing)
  • protein-translation (4 missing)
  • reverse-string (3 missing)

Fixes #775 (partial - crypto-square exercise)

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2025

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2025

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@github-actions github-actions bot closed this Jul 7, 2025
@alienx5499 alienx5499 mentioned this pull request Jul 7, 2025
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update test cases

1 participant