Skip to content

test(conversions): verify octalToDecimal invariants (R50-T034) - #72

Open
nishadaniket174 wants to merge 1 commit into
S-AI-Projects:masterfrom
nishadaniket174:student/e26b07f0789/R50-T034
Open

nishadaniket174 wants to merge 1 commit into
S-AI-Projects:masterfrom
nishadaniket174:student/e26b07f0789/R50-T034

Conversation

@nishadaniket174

@nishadaniket174 nishadaniket174 commented Nov 13, 2026 •

Copy link
Copy Markdown

Summary

This PR adds invariant-based tests for octalToDecimal in Conversions/OctToDecimal.js.

The tests verify that the function consistently converts valid octal inputs into their expected decimal values. They use independently calculated expected results to check the function's behavior rather than relying on its own implementation.

Changes Made

  • Added tests covering the smallest valid input and an ordinary octal input.
  • Added invariant-based checks using bounded valid inputs.
  • Used deterministic test generation to make the checks reproducible.
  • Added explicit expected results for the test cases.
  • Documented the relevant invariant alongside the implementation.
  • Added work/R50-T034/WORK_LOG.md containing the task analysis and evidence.
  • Added work/R50-T034/check.py to run the focused checks and the repository's native test suite.

Testing

Run the automated task check with:

python3 work/R50-T034/check.py

The script runs the focused checks and the repository test suite, and propagates failures.

Files Changed

  • Conversions/OctToDecimal.js
  • Conversions/test/OctToDecimal.test.js
  • work/R50-T034/WORK_LOG.md
  • work/R50-T034/check.py

Related Issue

Closes #34

Task: R50-T034

@nishadaniket174
nishadaniket174 force-pushed the student/e26b07f0789/R50-T034 branch from c7060fc to 06b22b3 Compare November 21, 2026 13:45
@nishadaniket174 nishadaniket174 changed the title Student/e26b07f0789/r50 t034 test(conversions): verify octalToDecimal invariants (R50-T034) Nov 21, 2026
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.

ANIKET KUMAR NISHAD — R50-T034: Test an invariant of octalToDecimal (OctToDecimal.js) [Conversions/OctToDecimal.js]

1 participant