about summary refs log tree commit diff
path: root/src/libtest/stats.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-319/+0
2020-03-07libtest: declare variables as floats instead of casting them ↵Matthias Krüger-8/+8
(clippy::unnecessary_cast)
2019-09-29Enhance report-time optionIgor Aleksanov-1/+1
2019-08-02libtest: Unconfigure tests during normal buildVadim Petrochenkov-31/+3
2019-06-16Separate libtest modulechansuke-576/+1
2019-04-07Revert "Auto merge of #57842 - gnzlbg:extract_libtest, r=gnzlbg"Jacob Greenfield-0/+922
This reverts commit 3eb4890dfe6db0279fdd3cda19f9643873ae3db9, reversing changes made to 7a4df3b53da369110984a2b57419c05a53e33b38.
2019-03-19Move libtest out of rust-lang/rustgnzlbg-922/+0
2019-02-04Transition libtest to 2018 editionHirokazu Hata-3/+3
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-09-04Introduce Custom Test FrameworksJohn Renner-1/+2
2018-03-21Cargo fmt libtestSeiichi Uchida-9/+14
2018-01-26libtest: rustfmt runGilad Naaman-241/+263
libtest: Whoops
2018-01-01Fix docs for future pulldown migrationMalo Jaffré-9/+9
2017-04-04Fix linkssteveklabnik-2/+4
part of https://github.com/rust-lang/rust/issues/40912 []\n() is not actually a link.
2017-02-27fix typoking6cong-2/+2
2017-01-02do not run outter part of benchmarks multimple times to fix issue 20142Craig Macomber-1/+4
2016-06-05run rustfmt on libtest folderSrinivas Reddy Thatiparthy-2/+1
2016-01-19rustfmt libtestNick Cameron-291/+262
2015-04-21std: Bring back f32::from_str_radix as an unstable APIAlex Crichton-2/+1
This API was exercised in a few tests and mirrors the `from_str_radix` functionality of the integer types.
2015-04-21std: Remove deprecated/unstable num functionalityAlex Crichton-74/+73
This commit removes all the old casting/generic traits from `std::num` that are no longer in use by the standard library. This additionally removes the old `strconv` module which has not seen much use in quite a long time. All generic functionality has been supplanted with traits in the `num` crate and the `strconv` module is supplanted with the [rust-strconv crate][rust-strconv]. [rust-strconv]: https://github.com/lifthrasiir/rust-strconv This is a breaking change due to the removal of these deprecated crates, and the alternative crates are listed above. [breaking-change]
2015-04-14Negative case of `len()` -> `is_empty()`Tamir Duberstein-4/+4
`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
2015-04-14test: Fixup many library unit testsAlex Crichton-3/+3
2015-03-31Stabilize std::numAaron Turon-0/+1
This commit stabilizes the `std::num` module: * The `Int` and `Float` traits are deprecated in favor of (1) the newly-added inherent methods and (2) the generic traits available in rust-lang/num. * The `Zero` and `One` traits are reintroduced in `std::num`, which together with various other traits allow you to recover the most common forms of generic programming. * The `FromStrRadix` trait, and associated free function, is deprecated in favor of inherent implementations. * A wide range of methods and constants for both integers and floating point numbers are now `#[stable]`, having been adjusted for integer guidelines. * `is_positive` and `is_negative` are renamed to `is_sign_positive` and `is_sign_negative`, in order to address #22985 * The `Wrapping` type is moved to `std::num` and stabilized; `WrappingOps` is deprecated in favor of inherent methods on the integer types, and direct implementation of operations on `Wrapping<X>` for each concrete integer type `X`. Closes #22985 Closes #21069 [breaking-change]
2015-03-20std: Remove old_io/old_path from the preludeAlex Crichton-1/+1
This commit removes the reexports of `old_io` traits as well as `old_path` types and traits from the prelude. This functionality is now all deprecated and needs to be removed to make way for other functionality like `Seek` in the `std::io` module (currently reexported as `NewSeek` in the io prelude). Closes #23377 Closes #23378
2015-03-15Use new io in print and println macrosesSimonas Kazlauskas-19/+0
2015-03-02core: Audit num module for int/uintBrian Anderson-12/+12
* count_ones/zeros, trailing_ones/zeros return u32, not usize * rotate_left/right take u32, not usize * RADIX, MANTISSA_DIGITS, DIGITS, BITS, BYTES are u32, not usize Doesn't touch pow because there's another PR for it. [breaking-change]
2015-02-22Record default implementations in a separate stepFlavio Percoco-0/+1
2015-02-18rollup merge of #22497: nikomatsakis/suffixesAlex Crichton-1/+1
Conflicts: src/librustc_trans/trans/tvec.rs
2015-02-18std: Stabilize the `hash` moduleAlex Crichton-2/+2
This commit is an implementation of [RFC 823][rfc] which is another pass over the `std::hash` module for stabilization. The contents of the module were not entirely marked stable, but some portions which remained quite similar to the previous incarnation are now marked `#[stable]`. Specifically: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0823-hash-simplification.md * `std::hash` is now stable (the name) * `Hash` is now stable * `Hash::hash` is now stable * `Hasher` is now stable * `SipHasher` is now stable * `SipHasher::new` and `new_with_keys` are now stable * `Hasher for SipHasher` is now stable * Many `Hash` implementations are now stable All other portions of the `hash` module remain `#[unstable]` as they are less commonly used and were recently redesigned. This commit is a breaking change due to the modifications to the `std::hash` API and more details can be found on the [RFC][rfc]. Closes #22467 [breaking-change]
2015-02-18Remove `i`, `is`, `u`, or `us` suffixes that are not necessary.Niko Matsakis-1/+1
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-9/+9
2015-02-02remove unused mut qualifiersJorge Aparicio-1/+1
2015-02-02`for x in xs.iter_mut()` -> `for x in &mut xs`Jorge Aparicio-1/+1
Also `for x in option.iter_mut()` -> `if let Some(ref mut x) = option`
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-2/+2
2015-01-29fix inference falloutJorge Aparicio-1/+1
2015-01-29convert remaining `range(a, b)` to `a..b`Jorge Aparicio-1/+1
2015-01-29`range(a, b).foo()` -> `(a..b).foo()`Jorge Aparicio-1/+1
sed -i 's/ range(\([^,]*\), *\([^()]*\))\./ (\1\.\.\2)\./g' **/*.rs
2015-01-27cleanup: s/`v.slice*()`/`&v[a..b]`/g + remove redundant `as_slice()` callsJorge Aparicio-1/+1
2015-01-26Fallout of io => old_ioAlex Crichton-2/+2
2015-01-22Remove remaining stats and boxplot code.Ahmed Charles-130/+0
2015-01-20std: Rename Show/String to Debug/DisplayAlex Crichton-2/+2
This commit is an implementation of [RFC 565][rfc] which is a stabilization of the `std::fmt` module and the implementations of various formatting traits. Specifically, the following changes were performed: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md * The `Show` trait is now deprecated, it was renamed to `Debug` * The `String` trait is now deprecated, it was renamed to `Display` * Many `Debug` and `Display` implementations were audited in accordance with the RFC and audited implementations now have the `#[stable]` attribute * Integers and floats no longer print a suffix * Smart pointers no longer print details that they are a smart pointer * Paths with `Debug` are now quoted and escape characters * The `unwrap` methods on `Result` now require `Display` instead of `Debug` * The `Error` trait no longer has a `detail` method and now requires that `Display` must be implemented. With the loss of `String`, this has moved into libcore. * `impl<E: Error> FromError<E> for Box<Error>` now exists * `derive(Show)` has been renamed to `derive(Debug)`. This is not currently warned about due to warnings being emitted on stage1+ While backwards compatibility is attempted to be maintained with a blanket implementation of `Display` for the old `String` trait (and the same for `Show`/`Debug`) this is still a breaking change due to primitives no longer implementing `String` as well as modifications such as `unwrap` and the `Error` trait. Most code is fairly straightforward to update with a rename or tweaks of method calls. [breaking-change] Closes #21436
2015-01-07std: Stabilize the std::hash moduleAlex Crichton-2/+2
This commit aims to prepare the `std::hash` module for alpha by formalizing its current interface whileholding off on adding `#[stable]` to the new APIs. The current usage with the `HashMap` and `HashSet` types is also reconciled by separating out composable parts of the design. The primary goal of this slight redesign is to separate the concepts of a hasher's state from a hashing algorithm itself. The primary change of this commit is to separate the `Hasher` trait into a `Hasher` and a `HashState` trait. Conceptually the old `Hasher` trait was actually just a factory for various states, but hashing had very little control over how these states were used. Additionally the old `Hasher` trait was actually fairly unrelated to hashing. This commit redesigns the existing `Hasher` trait to match what the notion of a `Hasher` normally implies with the following definition: trait Hasher { type Output; fn reset(&mut self); fn finish(&self) -> Output; } This `Hasher` trait emphasizes that hashing algorithms may produce outputs other than a `u64`, so the output type is made generic. Other than that, however, very little is assumed about a particular hasher. It is left up to implementors to provide specific methods or trait implementations to feed data into a hasher. The corresponding `Hash` trait becomes: trait Hash<H: Hasher> { fn hash(&self, &mut H); } The old default of `SipState` was removed from this trait as it's not something that we're willing to stabilize until the end of time, but the type parameter is always required to implement `Hasher`. Note that the type parameter `H` remains on the trait to enable multidispatch for specialization of hashing for particular hashers. Note that `Writer` is not mentioned in either of `Hash` or `Hasher`, it is simply used as part `derive` and the implementations for all primitive types. With these definitions, the old `Hasher` trait is realized as a new `HashState` trait in the `collections::hash_state` module as an unstable addition for now. The current definition looks like: trait HashState { type Hasher: Hasher; fn hasher(&self) -> Hasher; } The purpose of this trait is to emphasize that the one piece of functionality for implementors is that new instances of `Hasher` can be created. This conceptually represents the two keys from which more instances of a `SipHasher` can be created, and a `HashState` is what's stored in a `HashMap`, not a `Hasher`. Implementors of custom hash algorithms should implement the `Hasher` trait, and only hash algorithms intended for use in hash maps need to implement or worry about the `HashState` trait. The entire module and `HashState` infrastructure remains `#[unstable]` due to it being recently redesigned, but some other stability decision made for the `std::hash` module are: * The `Writer` trait remains `#[experimental]` as it's intended to be replaced with an `io::Writer` (more details soon). * The top-level `hash` function is `#[unstable]` as it is intended to be generic over the hashing algorithm instead of hardwired to `SipHasher` * The inner `sip` module is now private as its one export, `SipHasher` is reexported in the `hash` module. And finally, a few changes were made to the default parameters on `HashMap`. * The `RandomSipHasher` default type parameter was renamed to `RandomState`. This renaming emphasizes that it is not a hasher, but rather just state to generate hashers. It also moves away from the name "sip" as it may not always be implemented as `SipHasher`. This type lives in the `std::collections::hash_map` module as `#[unstable]` * The associated `Hasher` type of `RandomState` is creatively called... `Hasher`! This concrete structure lives next to `RandomState` as an implemenation of the "default hashing algorithm" used for a `HashMap`. Under the hood this is currently implemented as `SipHasher`, but it draws an explicit interface for now and allows us to modify the implementation over time if necessary. There are many breaking changes outlined above, and as a result this commit is a: [breaking-change]
2015-01-06rollup merge of #20653: alexcrichton/entry-unstableAlex Crichton-1/+1
There's been some debate over the precise form that these APIs should take, and they've undergone some changes recently, so these APIs are going to be left unstable for now to be fleshed out during the next release cycle.
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-3/+3
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2015-01-06[breaking change] Revert Entry behaviour to take keys by value.Dylan Ede-1/+1
2015-01-06Merge core::num::Float and std::num::FloatMath.Huon Wilson-4/+4
`FloatMath` no longer exists and all functionality from both traits is available under `Float`. Change from use std::num::{Float, FloatMath}; to use std::num::Float; [breaking-change]
2015-01-05rollup merge of #20556: japaric/no-for-sizedAlex Crichton-1/+1
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/libcore/borrow.rs src/libcore/cmp.rs src/libcore/ops.rs src/libstd/c_str.rs src/test/compile-fail/issue-19009.rs
2015-01-05rollup merge of #20554: huonw/mut-patternAlex Crichton-1/+2
Conflicts: src/librustc_typeck/check/_match.rs
2015-01-05sed -i -s 's/ for Sized?//g' **/*.rsJorge Aparicio-1/+1