Skip to content

style: replace interactive stdin in extended_euclid with assert tests - #3215

Open
zeeshanzzz788 wants to merge 1 commit into
TheAlgorithms:masterfrom
zeeshanzzz788:fix/extended-euclid-noninteractive
Open

style: replace interactive stdin in extended_euclid with assert tests#3215
zeeshanzzz788 wants to merge 1 commit into
TheAlgorithms:masterfrom
zeeshanzzz788:fix/extended-euclid-noninteractive

Conversation

@zeeshanzzz788

Copy link
Copy Markdown

Describe your change:

math/extended_euclid_algorithm.cpp used std::cin in main(), which breaks headless CI. Replaced interactive input with deterministic assert-based self-tests for both the recursive and iterative implementations.

Checklist:

  • I have read CONTRIBUTING.md
  • This PR only changes existing algorithm files
  • Self-tests pass locally (g++ build + run)

Fixes #3190

CI cannot provide keyboard input. Drive main() with deterministic
self-tests so the algorithm can be validated in headless builds.

Fixes TheAlgorithms#3190
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.

[OTHER]style: Remove interactive console input from extended_euclid_algorithm.cpp to fix CI compatibility

1 participant