diff options
| author | bors <bors@rust-lang.org> | 2014-11-07 00:02:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-11-07 00:02:18 +0000 |
| commit | 45cbdec4174778bf915f17561ef971c068a7fcbc (patch) | |
| tree | 9516c60b7323f1233858665501a5029c9c3f90f0 /src/libtest/lib.rs | |
| parent | 8ed288edb27fc83b15a549af69c82b5bb4f8ac1e (diff) | |
| parent | d27039d701a3c6e97f19e41436d06ed42c0f5f8a (diff) | |
| download | rust-45cbdec4174778bf915f17561ef971c068a7fcbc.tar.gz rust-45cbdec4174778bf915f17561ef971c068a7fcbc.zip | |
auto merge of #18719 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libtest/lib.rs')
| -rw-r--r-- | src/libtest/lib.rs | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 74bead9e5f2..4d6aefb2a17 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -1209,7 +1209,7 @@ impl MetricMap { let MetricMap(ref selfmap) = *self; let MetricMap(ref old) = *old; for (k, vold) in old.iter() { - let r = match selfmap.find(k) { + let r = match selfmap.get(k) { None => MetricRemoved, Some(v) => { let delta = v.value - vold.value; @@ -1678,31 +1678,31 @@ mod tests { let diff1 = m2.compare_to_old(&m1, None); - assert_eq!(*(diff1.find(&"in-both-noise".to_string()).unwrap()), LikelyNoise); - assert_eq!(*(diff1.find(&"in-first-noise".to_string()).unwrap()), MetricRemoved); - assert_eq!(*(diff1.find(&"in-second-noise".to_string()).unwrap()), MetricAdded); - assert_eq!(*(diff1.find(&"in-both-want-downwards-but-regressed".to_string()).unwrap()), + assert_eq!(*(diff1.get(&"in-both-noise".to_string()).unwrap()), LikelyNoise); + assert_eq!(*(diff1.get(&"in-first-noise".to_string()).unwrap()), MetricRemoved); + assert_eq!(*(diff1.get(&"in-second-noise".to_string()).unwrap()), MetricAdded); + assert_eq!(*(diff1.get(&"in-both-want-downwards-but-regressed".to_string()).unwrap()), Regression(100.0)); - assert_eq!(*(diff1.find(&"in-both-want-downwards-and-improved".to_string()).unwrap()), + assert_eq!(*(diff1.get(&"in-both-want-downwards-and-improved".to_string()).unwrap()), Improvement(50.0)); - assert_eq!(*(diff1.find(&"in-both-want-upwards-but-regressed".to_string()).unwrap()), + assert_eq!(*(diff1.get(&"in-both-want-upwards-but-regressed".to_string()).unwrap()), Regression(50.0)); - assert_eq!(*(diff1.find(&"in-both-want-upwards-and-improved".to_string()).unwrap()), + assert_eq!(*(diff1.get(&"in-both-want-upwards-and-improved".to_string()).unwrap()), Improvement(100.0)); assert_eq!(diff1.len(), 7); let diff2 = m2.compare_to_old(&m1, Some(200.0)); - assert_eq!(*(diff2.find(&"in-both-noise".to_string()).unwrap()), LikelyNoise); - assert_eq!(*(diff2.find(&"in-first-noise".to_string()).unwrap()), MetricRemoved); - assert_eq!(*(diff2.find(&"in-second-noise".to_string()).unwrap()), MetricAdded); - assert_eq!(*(diff2.find(&"in-both-want-downwards-but-regressed".to_string()).unwrap()), + assert_eq!(*(diff2.get(&"in-both-noise".to_string()).unwrap()), LikelyNoise); + assert_eq!(*(diff2.get(&"in-first-noise".to_string()).unwrap()), MetricRemoved); + assert_eq!(*(diff2.get(&"in-second-noise".to_string()).unwrap()), MetricAdded); + assert_eq!(*(diff2.get(&"in-both-want-downwards-but-regressed".to_string()).unwrap()), LikelyNoise); - assert_eq!(*(diff2.find(&"in-both-want-downwards-and-improved".to_string()).unwrap()), + assert_eq!(*(diff2.get(&"in-both-want-downwards-and-improved".to_string()).unwrap()), LikelyNoise); - assert_eq!(*(diff2.find(&"in-both-want-upwards-but-regressed".to_string()).unwrap()), + assert_eq!(*(diff2.get(&"in-both-want-upwards-but-regressed".to_string()).unwrap()), LikelyNoise); - assert_eq!(*(diff2.find(&"in-both-want-upwards-and-improved".to_string()).unwrap()), + assert_eq!(*(diff2.get(&"in-both-want-upwards-and-improved".to_string()).unwrap()), LikelyNoise); assert_eq!(diff2.len(), 7); } @@ -1727,29 +1727,29 @@ mod tests { let (diff1, ok1) = m2.ratchet(&pth, None); assert_eq!(ok1, false); assert_eq!(diff1.len(), 2); - assert_eq!(*(diff1.find(&"runtime".to_string()).unwrap()), Regression(10.0)); - assert_eq!(*(diff1.find(&"throughput".to_string()).unwrap()), LikelyNoise); + assert_eq!(*(diff1.get(&"runtime".to_string()).unwrap()), Regression(10.0)); + assert_eq!(*(diff1.get(&"throughput".to_string()).unwrap()), LikelyNoise); // Check that it was not rewritten. let m3 = MetricMap::load(&pth); let MetricMap(m3) = m3; assert_eq!(m3.len(), 2); - assert_eq!(*(m3.find(&"runtime".to_string()).unwrap()), Metric::new(1000.0, 2.0)); - assert_eq!(*(m3.find(&"throughput".to_string()).unwrap()), Metric::new(50.0, 2.0)); + assert_eq!(*(m3.get(&"runtime".to_string()).unwrap()), Metric::new(1000.0, 2.0)); + assert_eq!(*(m3.get(&"throughput".to_string()).unwrap()), Metric::new(50.0, 2.0)); // Ask for a ratchet with an explicit noise-percentage override, // that should advance. let (diff2, ok2) = m2.ratchet(&pth, Some(10.0)); assert_eq!(ok2, true); assert_eq!(diff2.len(), 2); - assert_eq!(*(diff2.find(&"runtime".to_string()).unwrap()), LikelyNoise); - assert_eq!(*(diff2.find(&"throughput".to_string()).unwrap()), LikelyNoise); + assert_eq!(*(diff2.get(&"runtime".to_string()).unwrap()), LikelyNoise); + assert_eq!(*(diff2.get(&"throughput".to_string()).unwrap()), LikelyNoise); // Check that it was rewritten. let m4 = MetricMap::load(&pth); let MetricMap(m4) = m4; assert_eq!(m4.len(), 2); - assert_eq!(*(m4.find(&"runtime".to_string()).unwrap()), Metric::new(1100.0, 2.0)); - assert_eq!(*(m4.find(&"throughput".to_string()).unwrap()), Metric::new(50.0, 2.0)); + assert_eq!(*(m4.get(&"runtime".to_string()).unwrap()), Metric::new(1100.0, 2.0)); + assert_eq!(*(m4.get(&"throughput".to_string()).unwrap()), Metric::new(50.0, 2.0)); } } |
