about summary refs log tree commit diff
path: root/src/libcollectionstest/slice.rs
AgeCommit message (Collapse)AuthorLines
2017-04-03Move libXtest into libX/testsStjepan Glavina-1180/+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-1/+15
2017-03-21Implement feature sort_unstableStjepan Glavina-10/+4
2017-02-06Extract collections benchmarks to libcollections/benchesSon-273/+0
And libcore/benches
2017-02-04Minor fix in the *_expensive benchmarkStjepan Glavina-6/+3
Before, the `count` would be copied into the closure and could potentially be optimized way. This change ensures it's borrowed by closure and finally consumed by `test::black_box`.
2016-12-07Implement a faster sort algorithmStjepan Glavina-66/+88
This is a complete rewrite of the standard sort algorithm. The new algorithm is a simplified variant of TimSort. In summary, the changes are: * Improved performance, especially on partially sorted inputs. * Performs less comparisons on both random and partially sorted inputs. * Decreased the size of temporary memory: the new sort allocates 4x less.
2016-11-23core, collections: Implement better .is_empty() for slice and vec iteratorsUlrik Sverdrup-0/+10
These iterators can use a pointer comparison instead of computing the length.
2016-10-25run rustfmt on libcollectionstestSrinivas Reddy Thatiparthy-18/+18
2016-10-13Auto merge of #36743 - SimonSapin:dedup-by, r=alexcrichtonbors-41/+0
Add Vec::dedup_by and Vec::dedup_by_key
2016-09-30Ignore lots and lots of std tests on emscriptenBrian Anderson-0/+1
2016-09-26Move Vec::dedup tests from slice.rs to vec.rsSimon Sapin-29/+0
2016-09-26Remove duplicate test.Simon Sapin-12/+0
test_dedup_shared has been exactly the same as test_dedup_unique since 6f16df4aa, three years ago.
2016-08-16Add basic unit test for `std::slice::Iter::as_slice`.Corey Farwell-0/+9
2016-08-16Implement `AsRef<[T]>` for `std::slice::Iter`.Corey Farwell-0/+9
`AsRef` is designed for conversions that are "cheap" (as per the API docs). It is the case that retrieving the underlying data of `std::slice::Iter` is cheap. In my opinion, there's no ambiguity about what slice data will be returned, otherwise, I would be more cautious about implementing `AsRef`.
2016-05-24format with [rustfmt_skip] and addressed a few commentsSrinivas Reddy Thatiparthy-2/+0
2016-05-22run rustfmt on libcollections test moduleSrinivas Reddy Thatiparthy-192/+174
2016-04-05Add test for [u8]'s Ord (and fix the old test for ord)Ulrik Sverdrup-6/+36
The old test for Ord used no asserts, and appeared to have a wrong test. (!).
2016-03-28Rollup merge of #32177 - srinivasreddy:remove_integer_suffixes, r=steveklabnikSteve Klabnik-4/+4
first round of removal of integer suffixes
2016-03-12std: Clean out deprecated APIsAlex Crichton-12/+0
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that are deprecated in the 1.8 release are sticking around for the rest of this cycle. Some notable changes are: * The `dynamic_lib` module was moved into `rustc_back` as the compiler still relies on a few bits and pieces. * The `DebugTuple` formatter now special-cases an empty struct name with only one field to append a trailing comma.
2016-03-11removed integer suffixes in libcollections and libcollectionstestsrinivasreddy-4/+4
2016-02-25Add unstable copy_from_sliceNicholas Mazzuca-0/+24
2016-01-30test: Deny warnings in {core,collections}testAlex Crichton-0/+1
Help cleans up our build a bit and stays in line with the rest of our crates denying warnings traditionally.
2016-01-26Fix warnings during testsAlex Crichton-1/+0
The deny(warnings) attribute is now enabled for tests so we need to weed out these warnings as well.
2015-12-13restore tests accidentally removed in #30182Tamir Duberstein-0/+11
2015-12-10std: Remove deprecated functionality from 1.5Alex Crichton-11/+0
This is a standard "clean out libstd" commit which removes all 1.5-and-before deprecated functionality as it's now all been deprecated for at least one entire cycle.
2015-08-12Remove all unstable deprecated functionalityAlex Crichton-186/+0
This commit removes all unstable and deprecated functions in the standard library. A release was recently cut (1.3) which makes this a good time for some spring cleaning of the deprecated functions.
2015-07-28Implement Clone for Box<[T]> where T: CloneJonathan Reem-0/+53
Closes #25097
2015-07-12Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichtonbors-10/+10
Fixes #26900
2015-07-12Implement RFC 1058Simonas Kazlauskas-40/+17
2015-07-10Change some instances of .connect() to .join()Wesley Wiser-10/+10
2015-07-09Use vec![elt; n] where possibleUlrik Sverdrup-4/+4
The common pattern `iter::repeat(elt).take(n).collect::<Vec<_>>()` is exactly equivalent to `vec![elt; n]`, do this replacement in the whole tree. (Actually, vec![] is smart enough to only call clone n - 1 times, while the former solution would call clone n times, and this fact is virtually irrelevant in practice.)
2015-04-14More test fixesAlex Crichton-2/+2
2015-04-14test: Fixup many library unit testsAlex Crichton-9/+9
2015-04-01rollup merge of #23945: pnkfelix/gate-u-negateAlex Crichton-2/+2
Feature-gate unsigned unary negate. Discussed in weekly meeting here: https://github.com/rust-lang/meeting-minutes/blob/master/weekly-meetings/2015-03-31.md#feature-gate--expr and also in the internals thread here: http://internals.rust-lang.org/t/forbid-unsigned-integer/752
2015-04-02Test fixes and rebase conflicts, round 2Alex Crichton-2/+2
Conflicts: src/libcore/num/mod.rs
2015-04-01std: Changing the meaning of the count to splitnAlex Crichton-12/+13
This commit is an implementation of [RFC 979][rfc] which changes the meaning of the count parameter to the `splitn` function on strings and slices. The parameter now means the number of items that are returned from the iterator, not the number of splits that are made. [rfc]: https://github.com/rust-lang/rfcs/pull/979 Closes #23911 [breaking-change]
2015-03-31std: Clean out #[deprecated] APIsAlex Crichton-2/+2
This commit cleans out a large amount of deprecated APIs from the standard library and some of the facade crates as well, updating all users in the compiler and in tests as it goes along.
2015-03-21std: Remove deprecated ptr functionsAlex Crichton-1/+1
The method with which backwards compatibility was retained ended up leading to documentation that rustdoc didn't handle well and largely ended up confusing.
2015-03-16move some tests back to libcollectionsJorge Aparicio-56/+0
2015-03-16extract libcollections tests into libcollectionstestJorge Aparicio-0/+1627