Skip to content

Commit 849644b

Browse files
committed
core: rename hashmap test functions
1 parent fed5df8 commit 849644b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/libcore/hashmap.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ mod test_map {
518518
use uint;
519519

520520
#[test]
521-
pub fn inserts() {
521+
pub fn test_insert() {
522522
let mut m = LinearMap::new();
523523
assert m.insert(1, 2);
524524
assert m.insert(2, 4);
@@ -527,7 +527,7 @@ mod test_map {
527527
}
528528

529529
#[test]
530-
pub fn overwrite() {
530+
pub fn test_insert_overwrite() {
531531
let mut m = LinearMap::new();
532532
assert m.insert(1, 2);
533533
assert *m.get(&1) == 2;
@@ -536,7 +536,7 @@ mod test_map {
536536
}
537537

538538
#[test]
539-
pub fn conflicts() {
539+
pub fn test_insert_conflicts() {
540540
let mut m = linear::linear_map_with_capacity(4);
541541
assert m.insert(1, 2);
542542
assert m.insert(5, 3);
@@ -547,7 +547,7 @@ mod test_map {
547547
}
548548

549549
#[test]
550-
pub fn conflict_remove() {
550+
pub fn test_conflict_remove() {
551551
let mut m = linear::linear_map_with_capacity(4);
552552
assert m.insert(1, 2);
553553
assert m.insert(5, 3);
@@ -558,7 +558,7 @@ mod test_map {
558558
}
559559

560560
#[test]
561-
pub fn empty() {
561+
pub fn test_is_empty() {
562562
let mut m = linear::linear_map_with_capacity(4);
563563
assert m.insert(1, 2);
564564
assert !m.is_empty();
@@ -567,23 +567,23 @@ mod test_map {
567567
}
568568

569569
#[test]
570-
pub fn pops() {
570+
pub fn test_pop() {
571571
let mut m = LinearMap::new();
572572
m.insert(1, 2);
573573
assert m.pop(&1) == Some(2);
574574
assert m.pop(&1) == None;
575575
}
576576

577577
#[test]
578-
pub fn swaps() {
578+
pub fn test_swap() {
579579
let mut m = LinearMap::new();
580580
assert m.swap(1, 2) == None;
581581
assert m.swap(1, 3) == Some(2);
582582
assert m.swap(1, 4) == Some(3);
583583
}
584584

585585
#[test]
586-
pub fn consumes() {
586+
pub fn test_consume() {
587587
let mut m = LinearMap::new();
588588
assert m.insert(1, 2);
589589
assert m.insert(2, 3);
@@ -598,7 +598,7 @@ mod test_map {
598598
}
599599

600600
#[test]
601-
pub fn iterate() {
601+
pub fn test_iterate() {
602602
let mut m = linear::linear_map_with_capacity(4);
603603
for uint::range(0, 32) |i| {
604604
assert m.insert(i, i*2);
@@ -612,7 +612,7 @@ mod test_map {
612612
}
613613

614614
#[test]
615-
pub fn find() {
615+
pub fn test_find() {
616616
let mut m = LinearMap::new();
617617
assert m.find(&1).is_none();
618618
m.insert(1, 2);

0 commit comments

Comments
 (0)