modularml / mojo

The Mojo Programming Language
https://docs.modular.com/mojo/manual/
Other
23.31k stars 2.59k forks source link

[stdlib] Add missing comparison operator tests #3145

Closed laszlokindrat closed 3 months ago

laszlokindrat commented 4 months ago

The following types are missing tests for the operators required by the Comparable trait (__le__, __ge__, etc.):

We 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.:

vguerra commented 4 months ago

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

laszlokindrat commented 3 months ago

This is now complete thanks to @MatveyF, @vguerra, and @martinvuyk! 🎉

martinvuyk commented 3 months ago

I actually had nothing to do with this lol, just pushed a commit that referenced this during a rebase. Anyhow great work :D