about summary refs log tree commit diff
path: root/src/libcoretest/num/int_macros.rs
AgeCommit message (Collapse)AuthorLines
2017-04-03Move libXtest into libX/testsStjepan Glavina-219/+0
This change moves: 1. `libcoretest` into `libcore/tests` 2. `libcollectionstest` into `libcollections/tests` This is a follow-up to #39561.
2016-03-11cleanup int suffixes in libcoretestsrinivasreddy-4/+4
2016-01-30test: Deny warnings in {core,collections}testAlex Crichton-3/+6
Help cleans up our build a bit and stays in line with the rest of our crates denying warnings traditionally.
2015-04-21std: Bring back f32::from_str_radix as an unstable APIAlex Crichton-34/+33
This API was exercised in a few tests and mirrors the `from_str_radix` functionality of the integer types.
2015-03-30Fix the falloutVadim Petrochenkov-3/+3
2015-03-02Use `const`s instead of `static`s where appropriateFlorian Zeitz-5/+5
This changes the type of some public constants/statics in libunicode. Notably some `&'static &'static [(char, char)]` have changed to `&'static [(char, char)]`. The regexp crate seems to be the sole user of these, yet this is technically a [breaking-change]
2015-03-02Rollup merge of #22504 - GuillaumeGomez:audit-integer-libcore, r=ManishearthManish Goregaokar-2/+2
Part of #22240.
2015-03-01Remove int/uint from libstd/lib.rsGuillaume Gomez-2/+2
2015-03-01Make Int::pow() take exp as u32 instead usizeGuillaume Gomez-0/+11
2015-01-30rollup merge of #21631: tbu-/isize_policeAlex Crichton-2/+2
Conflicts: src/libcoretest/iter.rs
2015-01-30std: Stabilize FromStr and parseAlex Crichton-21/+21
This commits adds an associated type to the `FromStr` trait representing an error payload for parses which do not succeed. The previous return value, `Option<Self>` did not allow for this form of payload. After the associated type was added, the following attributes were applied: * `FromStr` is now stable * `FromStr::Err` is now stable * `FromStr::from_str` is now stable * `StrExt::parse` is now stable * `FromStr for bool` is now stable * `FromStr for $float` is now stable * `FromStr for $integral` is now stable * Errors returned from stable `FromStr` implementations are stable * Errors implement `Display` and `Error` (both impl blocks being `#[stable]`) Closes #15138
2015-01-30Remove all `i` suffixesTobias Bucher-2/+2
2015-01-05Modernize macro_rules! invocationsKeegan McAllister-2/+2
macro_rules! is like an item that defines a macro. Other items don't have a trailing semicolon, or use a paren-delimited body. If there's an argument for matching the invocation syntax, e.g. parentheses for an expr macro, then I think that applies more strongly to the *inner* delimiters on the LHS, wrapping the individual argument patterns.
2015-01-05Stop using macro_escape as an inner attributeKeegan McAllister-2/+0
In preparation for the rename.
2015-01-03Remove deprecated functionalityAlex Crichton-1/+3
This removes a large array of deprecated functionality, regardless of how recently it was deprecated. The purpose of this commit is to clean out the standard libraries and compiler for the upcoming alpha release. Some notable compiler changes were to enable warnings for all now-deprecated command line arguments (previously the deprecated versions were silently accepted) as well as removing deriving(Zero) entirely (the trait was removed). The distribution no longer contains the libtime or libregex_macros crates. Both of these have been deprecated for some time and are available externally.
2015-01-02std: Stabilize the prelude moduleAlex Crichton-0/+1
This commit is an implementation of [RFC 503][rfc] which is a stabilization story for the prelude. Most of the RFC was directly applied, removing reexports. Some reexports are kept around, however: * `range` remains until range syntax has landed to reduce churn. * `Path` and `GenericPath` remain until path reform lands. This is done to prevent many imports of `GenericPath` which will soon be removed. * All `io` traits remain until I/O reform lands so imports can be rewritten all at once to `std::io::prelude::*`. This is a breaking change because many prelude reexports have been removed, and the RFC can be consulted for the exact list of removed reexports, as well as to find the locations of where to import them. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md [breaking-change] Closes #20068
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-1/+1
followed by a semicolon. This allows code like `vec![1i, 2, 3].len();` to work. This breaks code that uses macros as statements without putting semicolons after them, such as: fn main() { ... assert!(a == b) assert!(c == d) println(...); } It also breaks code that uses macros as items without semicolons: local_data_key!(foo) fn main() { println("hello world") } Add semicolons to fix this code. Those two examples can be fixed as follows: fn main() { ... assert!(a == b); assert!(c == d); println(...); } local_data_key!(foo); fn main() { println("hello world") } RFC #378. Closes #18635. [breaking-change]
2014-12-13libcoretest: fix unit testsJorge Aparicio-5/+5
2014-11-16Move FromStr to core::strBrendan Zabarauskas-1/+45
2014-11-13Remove Signed trait and add SignedInt traitBrendan Zabarauskas-1/+1
The methods have been moved into Float and SignedInt
2014-11-13Remove lots of numeric traits from the preludesBrendan Zabarauskas-0/+1
Num, NumCast, Unsigned, Float, Primitive and Int have been removed.
2014-11-13Move checked arithmetic operators into Int traitBrendan Zabarauskas-4/+3
2014-11-13Move abs_sub to FloatMathBrendan Zabarauskas-8/+0
This removes the need for libcore to depend on libm. `abs_sub` is not as useful for integers.
2014-11-13Take parameters by-value in Signed traitBrendan Zabarauskas-4/+4
2014-09-05Make integer bit count methods return uintsBrendan Zabarauskas-3/+3
Fixes rust-lang/rfcs#224
2014-07-04Change Shl<T, T> for Int to Shl<uint, T>Samuel Neves-2/+2
2014-07-02Fix rotate_{left, right} for multiple of bitsize rotation amountsSamuel Neves-0/+9
Add additional rotation tests
2014-06-29Extract tests from libcore to a separate crateSteven Fackler-0/+160
Libcore's test infrastructure is complicated by the fact that many lang items are defined in the crate. The current approach (realcore/realstd imports) is hacky and hard to work with (tests inside of core::cmp haven't been run for months!). Moving tests to a separate crate does mean that they can only test the public API of libcore, but I don't feel that that is too much of an issue. The only tests that I had to get rid of were some checking the various numeric formatters, but those are also exercised through normal format! calls in other tests.