Migrate unit tests of btree collections to their native breeding ground#75531
Migrate unit tests of btree collections to their native breeding ground#75531bors merged 2 commits intorust-lang:masterfrom ssomers:btree_tests_migration
Conversation
| y.insert(2); | ||
| y.insert(1); | ||
|
|
||
| assert_eq!(hash(&x), hash(&y)); |
There was a problem hiding this comment.
Can you say more about why this didn't migrate? (E.g. the error log)
There was a problem hiding this comment.
The hash function is defined in the integration test itself and uses the hashmap crate or whatever contains it.
There was a problem hiding this comment.
I didn't really look into what DefaultHasher is, it looks foreign enough for me to say it's an integration test.
There was a problem hiding this comment.
Or rather, to say it's not a btree unit test. In my book, it could be a hashmap unit test, built on top of btree.
There was a problem hiding this comment.
hm okay, seems fine to leave it external, though I suspect we could internalize it without too much trouble if we really wanted to.
There was a problem hiding this comment.
Oh, I see: it tests the default Hash implementation on BTreeSet. Why not test the non-default Hash implementation on BTreeMap for a change?
|
@bors r+ |
|
📌 Commit ff45df2 has been approved by |
|
Apparently I copied from the wrong pupil: everyone puts the |
Rollup of 17 pull requests Successful merges: - rust-lang#73943 (Document the unsafe keyword) - rust-lang#74062 (deny(unsafe_op_in_unsafe_fn) in libstd/ffi/c_str.rs) - rust-lang#74185 (Remove liballoc unneeded explicit link) - rust-lang#74192 (Improve documentation on process::Child.std* fields) - rust-lang#74409 (Change Debug impl of SocketAddr and IpAddr to match their Display output) - rust-lang#75195 (BTreeMap: purge innocent use of into_kv_mut) - rust-lang#75214 (Use intra-doc links in `mem::manually_drop` & `mem::maybe_uninit`) - rust-lang#75432 (Switch to intra-doc links in `std::process`) - rust-lang#75482 (Clean up E0752 explanation) - rust-lang#75501 (Move to intra doc links in std::ffi) - rust-lang#75509 (Tweak suggestion for `this` -> `self`) - rust-lang#75511 (Do not emit E0228 when it is implied by E0106) - rust-lang#75515 (Bump std's libc version to 0.2.74) - rust-lang#75517 (Promotion and const interning comments) - rust-lang#75519 (BTreeMap: refactor splitpoint and move testing over to unit test) - rust-lang#75530 (Switch to intra-doc links in os/raw/*.md) - rust-lang#75531 (Migrate unit tests of btree collections to their native breeding ground) Failed merges: r? @ghost
…crum Classify BinaryHeap & LinkedList unit tests as such All but one of these so-called integration test case are unit tests, just like btree's were (rust-lang#75531). In addition, reunite the unit tests of linked_list that were split off during rust-lang#23104 because they needed to remain unit tests (they were later moved to the separate file they are in during rust-lang#63207). The two sets could remain separate files, but I opted to merge them back together, more or less in the order they used to be, apart from one duplicate name `test_split_off` and one duplicate tiny function `list_from`.
There's one BTreeSet test case that I couldn't easily convince to come along, maybe because it truly is an integration test. But leaving it in place would mean git wouldn't see the move so I also moved it to a new file.
r? @Mark-Simulacrum