about summary refs log tree commit diff
path: root/src/libcoretest
AgeCommit message (Collapse)AuthorLines
2017-04-03Move libXtest into libX/testsStjepan Glavina-7661/+0
This change moves: 1. `libcoretest` into `libcore/tests` 2. `libcollectionstest` into `libcollections/tests` This is a follow-up to #39561.
2017-03-31Test sort algorithms using a random cmp functionStjepan Glavina-0/+12
2017-03-21Unit test heapsortStjepan Glavina-13/+32
2017-03-21Remove stabilized featuresStjepan Glavina-3/+0
2017-03-21Implement feature sort_unstableStjepan Glavina-4/+43
2017-03-17Minor fixups to fix tidy errorsAlex Crichton-4/+0
2017-02-07Improve fmt floatSon-7/+25
* Move to a separate float mod * Add more tests for f64 f32 lower exp upper exp * Use assert_eq for a clearer error message
2017-02-05Auto merge of #39567 - frewsxcv:rollup, r=frewsxcvbors-482/+3
Rollup of 12 pull requests - Successful merges: #39439, #39472, #39481, #39491, #39501, #39509, #39514, #39519, #39526, #39528, #39530, #39538 - Failed merges:
2017-02-05Rollup merge of #39501 - phungleson:libcorebench, r=alexcrichtonCorey Farwell-482/+3
Extract libcore benchmarks to a separate folder Fix #39484 r? @alexcrichton since you seem to know about this :) Thanks!
2017-02-05Auto merge of #39408 - ollie27:i128_try_from, r=alexcrichtonbors-0/+32
Fix TryFrom for i128/u128 Another case of `as` cast silent truncation being error prone. This also adds a few missing TryFrom tests to libcoretest. cc #33417 cc #35118
2017-02-05Rollup merge of #39107 - llogiq:branchless_filter_count, r=alexcrichtonCorey Farwell-0/+6
branchless .filter(_).count() I found that the branchless version is only slower if we have little to no branch misses, which usually isn't the case. I notice speedups between -5% (perfect prediction) and 60% (real world data).
2017-02-04Fix TryFrom for i128/u128Oliver Middleton-0/+32
Another case of `as` cast silent truncation being error prone. This also adds a few missing TryFrom tests to libcoretest.
2017-02-04Extract libcore benchmarks to a separate folderSon-482/+3
2017-02-03Merge remote-tracking branch 'upstream/master' into format-with-capacityMichał Krasnoborski-4/+32
2017-02-03Auto merge of #39287 - wesleywiser:move_cell, r=aturonbors-0/+32
Extend Cell to work with non-Copy types I'm not sure that I did this right but all of the tests pass. I also had to move the `new()` function so that `Cell`s with non-`Copy` `T`s could be created. That wasn't in the RFC but I assume it needed to be done?
2017-02-01Adjust heuristics to better handle "{}..." format strings.Michał Krasnoborski-1/+3
2017-01-31Removes FIXMEs related to #22405Wesley Wiser-3/+0
2017-01-28use `String::with_capacity` in `format!`Michał Krasnoborski-0/+9
2017-01-27Rollup merge of #39307 - alexcrichton:stabilize-1.16, r=brsonAlex Crichton-1/+0
std: Stabilize APIs for the 1.16.0 release This commit applies the stabilization/deprecations of the 1.16.0 release, as tracked by the rust-lang/rust issue tracker and the final-comment-period tag. The following APIs were stabilized: * `VecDeque::truncate` * `VecDeque::resize` * `String::insert_str` * `Duration::checked_{add,sub,div,mul}` * `str::replacen` * `SocketAddr::is_ipv{4,6}` * `IpAddr::is_ipv{4,6}` * `str::repeat` * `Vec::dedup_by` * `Vec::dedup_by_key` * `Result::unwrap_or_default` * `<*const T>::wrapping_offset` * `<*mut T>::wrapping_offset` * `CommandExt::creation_flags` (on Windows) * `File::set_permissions` * `String::split_off` The following APIs were deprecated * `EnumSet` - replaced with other ecosystem abstractions, long since unstable Closes #27788 Closes #35553 Closes #35774 Closes #36436 Closes #36949 Closes #37079 Closes #37087 Closes #37516 Closes #37827 Closes #37916 Closes #37966 Closes #38080
2017-01-25std: Stabilize APIs for the 1.16.0 releaseAlex Crichton-1/+0
This commit applies the stabilization/deprecations of the 1.16.0 release, as tracked by the rust-lang/rust issue tracker and the final-comment-period tag. The following APIs were stabilized: * `VecDeque::truncate` * `VecDeque::resize` * `String::insert_str` * `Duration::checked_{add,sub,div,mul}` * `str::replacen` * `SocketAddr::is_ipv{4,6}` * `IpAddr::is_ipv{4,6}` * `str::repeat` * `Vec::dedup_by` * `Vec::dedup_by_key` * `Result::unwrap_or_default` * `<*const T>::wrapping_offset` * `<*mut T>::wrapping_offset` * `CommandExt::creation_flags` (on Windows) * `File::set_permissions` * `String::split_off` The following APIs were deprecated * `EnumSet` - replaced with other ecosystem abstractions, long since unstable Closes #27788 Closes #35553 Closes #35774 Closes #36436 Closes #36949 Closes #37079 Closes #37087 Closes #37516 Closes #37827 Closes #37916 Closes #37966 Closes #38080
2017-01-24Extend Cell to work with non-Copy typesWesley Wiser-0/+32
Part of #39264
2017-01-24add explanation, fix testAndre Bogus-1/+1
2017-01-22Remove a FIXME in core/hash testsWesley Wiser-3/+2
2017-01-18add test case for filter+countAndre Bogus-0/+6
2017-01-14Auto merge of #38982 - clarcharr:expect_err, r=aturonbors-0/+14
expect_err for Result. This adds an `expect_err` method to `Result`. Considering how `unwrap_err` already exists, this seems to make sense. Inconsistency noted in Manishearth/rust-clippy#1435.
2017-01-13expect_err for Result.Clar Charr-0/+14
2017-01-11Implement Display for char Escape*, To*case.Clar Charr-125/+99
2017-01-10Implement `iter::Sum` and `iter::Product` for `Result`Jake Goulding-0/+16
This introduces a private iterator adapter `ResultShunt`, which allows treating an iterator of `Result<T, E>` as an iterator of `T`.
2016-12-16Address falloutAaron Turon-19/+22
2016-12-13Auto merge of #38309 - sfackler:rfc-1725, r=alexcrichtonbors-0/+24
Implement RFC #1725 (read_unaligned, write_unaligned) cc #37955 r? @alexcrichton
2016-12-12Implement RFC #1725Steven Fackler-0/+24
cc #37955
2016-11-30Rename 'librustc_unicode' crate to 'libstd_unicode'.Corey Farwell-1/+1
Fixes #26554.
2016-11-26Overload get{,_mut}{,_unchecked}Steven Fackler-0/+44
2016-11-22Auto merge of #37834 - bluss:peek-none, r=BurntSushibors-0/+68
Make Peekable remember peeking a None Peekable should remember if a None has been seen in the `.peek()` method. It ensures that `.peek(); .peek();` or `.peek(); .next();` only advances the underlying iterator at most once. This does not by itself make the iterator fused. Thanks to @s3bk for the code in `fn peek()` itself. Fixes #37784
2016-11-21Auto merge of #37127 - jseyfried:stabilize_RFC_1560, r=nrcbors-2/+0
Stabilize RFC 1560 Fixes #13598, fixes #23157, fixes #32303. cc #35120 r? @nrc
2016-11-21Stabilize RFC 1560.Jeffrey Seyfried-2/+0
2016-11-18Fix `fmt::Debug` for strings, e.g. for Chinese charactersTobias Bucher-0/+2
The problem occured due to lines like ``` 3400;<CJK Ideograph Extension A, First>;Lo;0;L;;;;;N;;;;; 4DB5;<CJK Ideograph Extension A, Last>;Lo;0;L;;;;;N;;;;; ``` in `UnicodeData.txt`, which the script previously interpreted as two characters, although it represents the whole range. Fixes #34318.
2016-11-17core::iter: Peekable should remember peeking a NoneUlrik Sverdrup-0/+68
Peekable must remember if a None has been seen in the `.peek()` method. It ensures that `.peek(); .peek();` or `.peek(); .next();` only advances the underlying iterator at most once. This does not by itself make the iterator fused.
2016-11-01Merge branch 'master' of https://github.com/rust-lang/rustMarcin Fatyga-9/+60
Conflicts: src/libcoretest/lib.rs
2016-11-01Auto merge of #37299 - devonhollowood:result-unwrap-or-default, r=alexcrichtonbors-0/+7
Add `unwrap_or_default` method to `Result` Fixes #37025
2016-10-27Rename ordering chaining functions.Marcin Fatyga-20/+20
2016-10-26Auto merge of #37315 - bluss:fold-more, r=alexcrichtonbors-0/+12
Implement Iterator::fold for .chain(), .cloned(), .map() and the VecDeque iterators. Chain can do something interesting here where it passes on the fold into its inner iterators. The lets the underlying iterator's custom fold() be used, and skips the regular chain logic in next. Also implement .fold() specifically for .map() and .cloned() so that any inner fold improvements are available through map and cloned. The same way, a VecDeque iterator fold can be turned into two slice folds. These changes lend the power of the slice iterator's loop codegen to VecDeque, and to chains of slice iterators, and so on. It's an improvement for .sum() and .product(), and other uses of fold.
2016-10-25iter: Implement .fold() for .chain()Ulrik Sverdrup-0/+12
Chain can do something interesting here where it passes on the fold into its inner iterators. The lets the underlying iterator's custom fold() be used, and skips the regular chain logic in next.
2016-10-25Small improvement to SipHasherarthurprs-0/+21
2016-10-21Fix use of `result_unwrap_or_default` featureDevon Hollowood-2/+1
2016-10-21Fix `test_unwrap_or_default`Devon Hollowood-0/+2
2016-10-19Add `unwrap_or_default` method to `Result`Devon Hollowood-0/+6
2016-10-09Add or and or_else for ordering.Marcin Fatyga-0/+27
2016-10-03Auto merge of #36815 - alexcrichton:stabilize-1.13, r=aturonbors-0/+3
std: Stabilize and deprecate APIs for 1.13 This commit is intended to be backported to the 1.13 branch, and works with the following APIs: Stabilized * `i32::checked_abs` * `i32::wrapping_abs` * `i32::overflowing_abs` * `RefCell::try_borrow` * `RefCell::try_borrow_mut` Deprecated * `BinaryHeap::push_pop` * `BinaryHeap::replace` * `SipHash13` * `SipHash24` * `SipHasher` - use `DefaultHasher` instead in the `std::collections::hash_map` module Closes #28147 Closes #34767 Closes #35057 Closes #35070
2016-10-03std: Stabilize and deprecate APIs for 1.13Alex Crichton-0/+3
This commit is intended to be backported to the 1.13 branch, and works with the following APIs: Stabilized * `i32::checked_abs` * `i32::wrapping_abs` * `i32::overflowing_abs` * `RefCell::try_borrow` * `RefCell::try_borrow_mut` * `DefaultHasher` * `DefaultHasher::new` * `DefaultHasher::default` Deprecated * `BinaryHeap::push_pop` * `BinaryHeap::replace` * `SipHash13` * `SipHash24` * `SipHasher` - use `DefaultHasher` instead in the `std::collections::hash_map` module Closes #28147 Closes #34767 Closes #35057 Closes #35070