rust/library/core/tests/num
Philippe Laflamme 64d695b753
Adds tests to ensure some base op traits exist.
These tests invoke the various op traits using all accepted types they
are implemented for as well as for references to those types.

This fixes #49660 and ensures the following implementations exist:

* `Add`, `Sub`, `Mul`, `Div`, `Rem`
  * `T op T`, `T op &T`, `&T op T` and `&T op &T`
  * for all integer and floating point types
* `AddAssign`, `SubAssign`, `MulAssign`, `DivAssign`, `RemAssign`
  * `&mut T op T` and `&mut T op &T`
  * for all integer and floating point types
* `Neg`
  * `op T` and `op &T`
  * for all signed integer and floating point types
* `Not`
  * `op T` and `op &T`
  * for `bool`
* `BitAnd`, `BitOr`, `BitXor`
  * `T op T`, `T op &T`, `&T op T` and `&T op &T`
  * for all integer types and bool
* `BitAndAssign`, `BitOrAssign`, `BitXorAssign`
  * `&mut T op T` and `&mut T op &T`
  * for all integer types and bool
* `Shl`, `Shr`
  * `L op R`, `L op &R`, `&L op R` and `&L op &R`
  * for all pairs of integer types
* `ShlAssign`, `ShrAssign`
  * `&mut L op R`, `&mut L op &R`
  * for all pairs of integer types
2021-01-13 23:14:00 -05:00
..
dec2flt mv std libs to library/ 2020-07-27 19:51:13 -05:00
flt2dec flt2dec: properly handle uninitialized memory 2020-09-02 12:41:38 +02:00
bignum.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
i8.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
i16.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
i32.rs Minor refactoring 2020-09-05 17:07:53 +05:30
i64.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
i128.rs Add u128 and i128 integer tests 2020-11-14 20:27:08 +01:00
int_macros.rs Add u128 and i128 integer tests 2020-11-14 20:27:08 +01:00
mod.rs Adds tests to ensure some base op traits exist. 2021-01-13 23:14:00 -05:00
nan.rs Update tests to remove old numeric constants 2020-11-29 00:55:55 -05:00
ops.rs Adds tests to ensure some base op traits exist. 2021-01-13 23:14:00 -05:00
u8.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
u16.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
u32.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
u64.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
u128.rs Add u128 and i128 integer tests 2020-11-14 20:27:08 +01:00
uint_macros.rs Add u128 and i128 integer tests 2020-11-14 20:27:08 +01:00
wrapping.rs Avoid ident concatenation in macro. 2021-01-13 23:13:55 -05:00