Skip to content

Commit

Permalink
Rollup merge of rust-lang#94126 - ssomers:alloc_prep_1, r=Mark-Simula…
Browse files Browse the repository at this point in the history
…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`.
  • Loading branch information
JohnTitor authored May 2, 2022
2 parents 4c5efea + a3a5d83 commit ddfc65d
Show file tree
Hide file tree
Showing 5 changed files with 692 additions and 694 deletions.
3 changes: 3 additions & 0 deletions library/alloc/src/collections/binary_heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ use crate::vec::{self, AsVecIntoIter, Vec};

use super::SpecExtend;

#[cfg(test)]
mod tests;

/// A priority queue implemented with a binary heap.
///
/// This will be a max-heap.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::collections::binary_heap::{Drain, PeekMut};
use std::collections::BinaryHeap;
use super::*;
use crate::boxed::Box;
use std::iter::TrustedLen;
use std::panic::{catch_unwind, AssertUnwindSafe};
use std::sync::atomic::{AtomicU32, Ordering};
Expand Down
Loading

0 comments on commit ddfc65d

Please sign in to comment.