about summary refs log tree commit diff
path: root/src/libcore/tests
AgeCommit message (Collapse)AuthorLines
2017-06-16Auto merge of #42631 - malbarbo:wasm32, r=alexcrichtonbors-0/+8
Add a travis builder for wasm32-unknown-emscripten This commits add an entry to travis matrix that will execute wasm32-unknown-emscripten tests suites. - Emscripten for asmjs was updated to sdk-1.37.13-64bit - The tests are run with node 8.0.0 (it can execute wasm) - A wrapper script is used to run each test from the directory where it is (workaround for https://github.com/kripken/emscripten/issues/4542) - Some tests are ignore, see #42629 and #42630
2017-06-14Re-implement float min/max in rustSimonas Kazlauskas-0/+55
See #42423
2017-06-13Ignore some failing test on wasm32-unknown-emscriptenMarco A L Barbosa-0/+8
See #42629 and #42630.
2017-06-06Add max and min default fns to Ord traitNick Whitney-0/+11
Pursuant to issue #25663, this commit adds the max and min functions to the Ord trait, enabling items that implement Ord to use UFCS (ex. 1.max(2)) instead of the longer std::cmp::max(1,2) format.
2017-06-02Rollup merge of #42310 - scottmcm:deprecate-range-stepby, r=alexcrichtonMark Simulacrum-13/+21
Deprecate range-specific `step_by` Deprecation attributes and test updates only. Was replaced by an any-iterator version in https://github.com/rust-lang/rust/pull/41439 Last follow-up (this release) to https://github.com/rust-lang/rust/pull/42110#issuecomment-303210138 r? @alexcrichton
2017-06-02Auto merge of #41670 - scottmcm:slice-rotate, r=alexcrichtonbors-0/+17
Add an in-place rotate method for slices to libcore A helpful primitive for moving chunks of data around inside a slice. For example, if you have a range selected and are drag-and-dropping it somewhere else (Example from [Sean Parent's talk](https://youtu.be/qH6sSOr-yk8?t=560)). (If this should be an RFC instead of a PR, please let me know.) Edit: changed example
2017-05-31Avoid range::step_by in another testScott McMurray-2/+2
2017-05-31Deprecate Range*::step_byScott McMurray-13/+21
Changed all the tests except test_range_step to use Iterator::step_by.
2017-05-30RangeFrom should have an infinite size_hintScott McMurray-0/+1
This makes the size_hint from things like `take` more precise.
2017-05-28Auto merge of #42167 - scottmcm:iter-stepby-sizehint, r=alexcrichtonbors-0/+75
Override size_hint and propagate ExactSizeIterator for iter::StepBy Generally useful, but also a prerequisite for moving a bunch of unit tests off `Range*::step_by`. A small non-breaking subset of https://github.com/rust-lang/rust/pull/42110 (which I closed). Includes two small documentation changes @ivandardi requested on that PR. r? @alexcrichton
2017-05-23Override size_hint and propagate ExactSizeIterator for iter::StepByScott McMurray-0/+75
Generally useful, but also a prerequisite for moving a bunch of unit tests off Range::step_by.
2017-05-21Return a correct size_hint for degenerate inclusive rangesScott McMurray-0/+5
Fixes https://github.com/rust-lang/rust/issues/42135 Found while fixing run-pass/range_inclusive test failure.
2017-05-21Stop returning k from [T]::rotateScott McMurray-2/+2
2017-05-21Add an in-place rotate method for slices to libcoreScott McMurray-0/+17
A helpful primitive for moving chunks of data around inside a slice. In particular, adding elements to the end of a Vec then moving them somewhere else, as a way to do efficient multiple-insert. (There's drain for efficient block-remove, but no easy way to block-insert.) Talk with another example: <https://youtu.be/qH6sSOr-yk8?t=560>
2017-05-21Make RangeInclusive just a two-field structScott McMurray-1/+18
Not being an enum improves ergonomics, especially since NonEmpty could be Empty. It can still be iterable without an extra "done" bit by making the range have !(start <= end), which is even possible without changing the Step trait. Implements RFC 1980
2017-05-12Fix commit derp and update implementations and documentationIvan Dardi-1/+29
2017-05-04fallout from NonZero/Unique/Shared changesAlexis Beingessner-6/+6
2017-04-26Rollup merge of #41493 - scottmcm:fix-step-replace, r=sfacklerAriel Ben-Yehuda-0/+40
Step::replace_one should put a one, not a zero (Issue #41492) Turns out all six of the replace_* impls were backwards.
2017-04-23Step::replace_one should put a one, not a zero (Issue #41492)Scott McMurray-0/+40
Turns out all six of these impls are incorrect.
2017-04-20Remove float_extrasJosh Stone-12/+35
[unstable, deprecated since 1.11.0]
2017-04-09Auto merge of #41154 - bluss:slice-rfind, r=alexcrichtonbors-0/+14
Implement .rfind() for slice iterators Iter and IterMut Just like the forward case find, implement rfind explicitly for slice iterators Iter and IterMut.
2017-04-08slice: Implement .rfind() for slice iterators Iter and IterMutUlrik Sverdrup-0/+14
Just like the forward case find, implement rfind explicitly
2017-04-07Optimize AtomicBool::fetch_nandStjepan Glavina-1/+14
2017-04-03Move libXtest into libX/testsStjepan Glavina-0/+7661
This change moves: 1. `libcoretest` into `libcore/tests` 2. `libcollectionstest` into `libcollections/tests` This is a follow-up to #39561.