-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[stdlib] Improve tests for abs
, divmod
, round
free functions
#2679
Labels
Comments
laszlokindrat
added
good first issue
Good for newcomers
mojo-repo
Tag all issues with this label
labels
May 16, 2024
@laszlokindrat can I work on this? |
@msaelices it's yours, thank you! |
PR ready for review: #2724 |
modularbot
pushed a commit
that referenced
this issue
May 22, 2024
…h functions (#40350) [External] [stdlib][NFC] Tests for the abs() round() and divmod() math functions All of these functions call to the specific `__abs__`, `__round__` and `__divmod__` methods depending on the types involved. These are some smoke tests to make sure they do not accidentally break See ticket #2679 Co-authored-by: Manuel Saelices <msaelices@gmail.com> Closes #2724 MODULAR_ORIG_COMMIT_REV_ID: 476d782383800dc7a6e39aaa8f0fca4c1a713844
Should we close this? |
Yes, thanks for fixing it! |
martinvuyk
pushed a commit
to martinvuyk/mojo
that referenced
this issue
May 24, 2024
…h functions (#40350) [External] [stdlib][NFC] Tests for the abs() round() and divmod() math functions All of these functions call to the specific `__abs__`, `__round__` and `__divmod__` methods depending on the types involved. These are some smoke tests to make sure they do not accidentally break See ticket modularml#2679 Co-authored-by: Manuel Saelices <msaelices@gmail.com> Closes modularml#2724 MODULAR_ORIG_COMMIT_REV_ID: 476d782383800dc7a6e39aaa8f0fca4c1a713844
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
These delegate to dunder methods, which should be tested separately for each structs that implement them. However, we do need a few basic tests to ensure that the free functions do work (e.g. so we don't accidentally rename them).
See comment: 65f0e5b#diff-2812447c50533870693b58783ccb2c24de6d8d3083372eb17084dbe369eb87a6R43-R45
The text was updated successfully, but these errors were encountered: