Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test_atoi.c #2

Merged
merged 1 commit into from
Oct 19, 2024
Merged

Update test_atoi.c #2

merged 1 commit into from
Oct 19, 2024

Conversation

Desoroxxx
Copy link
Owner

Enhances the testing of the atoi implementation in the repository. While the current test suite checks the basic functionality of atoi, it does not verify that it handles overflow conditions correctly, which is an important aspect of the original atoi function.

To address this limitation, introduces additional test cases that specifically check for overflow scenarios, such as when the input string represents a value greater/less than LONG_MAX or less/greater than LONG_MIN. The tests are designed to ensure that the atoi implementation correctly handles these overflow cases by returning values that may include 0, 1, 2, -1, -2, or similar values, mirroring the behavior of the original atoi function in these scenarios.
@Desoroxxx Desoroxxx merged commit 85c3827 into Desoroxxx:master Oct 19, 2024
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.

2 participants