-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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] Add missing comparison operator tests #3145
Labels
good first issue
Good for newcomers
Comments
modularbot
added a commit
that referenced
this issue
Jul 10, 2024
Added unit tests for `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__`, and `__ge__` dunders of `Int`. Related to #3145 ORIGINAL_AUTHOR=Matvey Fedoseev <41521530+MatveyF@users.noreply.github.com> PUBLIC_PR_LINK=#3161 Co-authored-by: Matvey Fedoseev <41521530+MatveyF@users.noreply.github.com> Closes #3161 MODULAR_ORIG_COMMIT_REV_ID: 12875e85edc971dcd61913293988525cf7c19c71
vguerra
added a commit
to vguerra/mojo
that referenced
this issue
Jul 10, 2024
…y `Comparable` Testing the following dunder methods in `IntLiteral`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any uninteded implicit convertions possibly introduced trough operator syntax sugar. Partially resolves modularml#3145.
martinvuyk
pushed a commit
to martinvuyk/mojo
that referenced
this issue
Jul 10, 2024
Added unit tests for `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__`, and `__ge__` dunders of `Int`. Related to modularml#3145 ORIGINAL_AUTHOR=Matvey Fedoseev <41521530+MatveyF@users.noreply.github.com> PUBLIC_PR_LINK=modularml#3161 Co-authored-by: Matvey Fedoseev <41521530+MatveyF@users.noreply.github.com> Closes modularml#3161 MODULAR_ORIG_COMMIT_REV_ID: 12875e85edc971dcd61913293988525cf7c19c71 Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
vguerra
added a commit
to vguerra/mojo
that referenced
this issue
Jul 11, 2024
…y `Comparable` Testing the following dunder methods in `IntLiteral`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any uninteded implicit convertions possibly introduced trough operator syntax sugar. Partially resolves modularml#3145.
vguerra
added a commit
to vguerra/mojo
that referenced
this issue
Jul 11, 2024
…y `Comparable` Testing the following dunder methods in `IntLiteral`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any unintended implicit conversions possibly introduced trough operator syntax sugar. Partially resolves modularml#3145.
vguerra
added a commit
to vguerra/mojo
that referenced
this issue
Jul 11, 2024
…y `Comparable` Testing the following dunder methods in `IntLiteral`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any unintended implicit conversions possibly introduced trough operator syntax sugar. Partially resolves modularml#3145.
vguerra
added a commit
to vguerra/mojo
that referenced
this issue
Jul 11, 2024
…y `Comparable` Testing the following dunder methods in `IntLiteral`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any unintended implicit conversions possibly introduced trough operator syntax sugar. Partially resolves modularml#3145. Signed-off-by: vm.guerramoran <vm.guerramoran@criteo.com>
vguerra
added a commit
to vguerra/mojo
that referenced
this issue
Jul 11, 2024
…y `Comparable` Testing the following dunder methods in `IntLiteral`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any unintended implicit conversions possibly introduced trough operator syntax sugar. Partially resolves modularml#3145. Signed-off-by: Victor Guerra <vguerra@gmail.com>
vguerra
added a commit
to vguerra/mojo
that referenced
this issue
Jul 11, 2024
Testing the following dunder methods in `IntLiteral`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any unintended implicit conversions possibly introduced trough operator syntax sugar. Partially resolves modularml#3145. Signed-off-by: Victor Guerra <vguerra@gmail.com>
vguerra
added a commit
to vguerra/mojo
that referenced
this issue
Jul 11, 2024
Testing the following dunder methods in `FloatLiteral`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any unintended implicit conversions possibly introduced trough operator syntax sugar. Partially resolves modularml#3145 Signed-off-by: Victor Guerra <vguerra@gmail.com>
vguerra
added a commit
to vguerra/mojo
that referenced
this issue
Jul 11, 2024
Testing the following dunder methods in `SIMD`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any unintended implicit conversions possibly introduced trough operator syntax sugar. Partially resolves modularml#3145 Signed-off-by: Victor Guerra <vguerra@gmail.com>
hello @laszlokindrat , just wanted to let you know that I pushed a couple of PRs to address the tasks in this issue: #3214 , #3216 and #3221 |
modularbot
pushed a commit
that referenced
this issue
Jul 17, 2024
…Comparable` (#43484) [External] [stdlib] UTests for `IntLiteral`'s operators required by `Comparable` Testing the following dunder methods in `IntLiteral`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any unintended implicit conversions possibly introduced trough operator syntax sugar. Partially resolves #3145. Co-authored-by: Victor Guerra <vguerra@gmail.com> Closes #3214 MODULAR_ORIG_COMMIT_REV_ID: d516752f3b9dce381e8b7b164b8e1a56054dbc0c
modularbot
pushed a commit
that referenced
this issue
Jul 17, 2024
… `Comparable` (#43485) [External] [stdlib] UTests for `FloatLiteral`'s operators required by `Comparable` Testing the following dunder methods in `FloatLiteral`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any unintended implicit conversions possibly introduced trough operator syntax sugar. Partially resolves #3145 Co-authored-by: Victor Guerra <vguerra@gmail.com> Closes #3216 MODULAR_ORIG_COMMIT_REV_ID: fc13864bfb0e4ffd5152f9a4af9940722933b4ab
modularbot
pushed a commit
that referenced
this issue
Jul 23, 2024
…able` (#43826) [External] [stdlib] UTests for `SIMD`'s operators required by `Comparable` Testing the following dunder methods in `SIMD`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any unintended implicit conversions possibly introduced trough operator syntax sugar. Partially resolves #3145 Co-authored-by: Victor Guerra <vguerra@gmail.com> Closes #3221 MODULAR_ORIG_COMMIT_REV_ID: 55ece3450c8b074ae3279f79cec8aa642382b036
This is now complete thanks to @MatveyF, @vguerra, and @martinvuyk! 🎉 |
I actually had nothing to do with this lol, just pushed a commit that referenced this during a rebase. Anyhow great work :D |
modularbot
added a commit
that referenced
this issue
Sep 13, 2024
Added unit tests for `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__`, and `__ge__` dunders of `Int`. Related to #3145 ORIGINAL_AUTHOR=Matvey Fedoseev <41521530+MatveyF@users.noreply.github.com> PUBLIC_PR_LINK=#3161 Co-authored-by: Matvey Fedoseev <41521530+MatveyF@users.noreply.github.com> Closes #3161 MODULAR_ORIG_COMMIT_REV_ID: 12875e85edc971dcd61913293988525cf7c19c71
modularbot
pushed a commit
that referenced
this issue
Sep 13, 2024
…Comparable` (#43484) [External] [stdlib] UTests for `IntLiteral`'s operators required by `Comparable` Testing the following dunder methods in `IntLiteral`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any unintended implicit conversions possibly introduced trough operator syntax sugar. Partially resolves #3145. Co-authored-by: Victor Guerra <vguerra@gmail.com> Closes #3214 MODULAR_ORIG_COMMIT_REV_ID: d516752f3b9dce381e8b7b164b8e1a56054dbc0c
modularbot
pushed a commit
that referenced
this issue
Sep 13, 2024
… `Comparable` (#43485) [External] [stdlib] UTests for `FloatLiteral`'s operators required by `Comparable` Testing the following dunder methods in `FloatLiteral`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any unintended implicit conversions possibly introduced trough operator syntax sugar. Partially resolves #3145 Co-authored-by: Victor Guerra <vguerra@gmail.com> Closes #3216 MODULAR_ORIG_COMMIT_REV_ID: fc13864bfb0e4ffd5152f9a4af9940722933b4ab
modularbot
pushed a commit
that referenced
this issue
Sep 13, 2024
…able` (#43826) [External] [stdlib] UTests for `SIMD`'s operators required by `Comparable` Testing the following dunder methods in `SIMD`: `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`. Note that we test directly dunder methods to avoid any unintended implicit conversions possibly introduced trough operator syntax sugar. Partially resolves #3145 Co-authored-by: Victor Guerra <vguerra@gmail.com> Closes #3221 MODULAR_ORIG_COMMIT_REV_ID: 55ece3450c8b074ae3279f79cec8aa642382b036
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following types are missing tests for the operators required by the
Comparable
trait (__le__
,__ge__
, etc.):Int
: done in [stdlib]Int
comparison operator unit tests #3161IntLiteral
: done in [stdlib] UTests forIntLiteral
's operators required byComparable
#3214FloatLiteral
: done in [stdlib] UTests forFloatLiteral
's operators required byComparable
#3216SIMD
: done in [stdlib] UTests forSIMD
's operators required byComparable
#3221We should also ensure they have tests for
__eq__
and__ne__
. Keep in mind that dunder methods should be tested directly (i.e. not through operator syntax sugar) for these basic numeric types to avoid unintended implicit conversions.:The text was updated successfully, but these errors were encountered: