tests: Move run-pass tests without naming conflicts to ui
This commit is contained in:
parent
ca9faa52f5
commit
9be35f82c1
3226 changed files with 64 additions and 196 deletions
|
@ -0,0 +1,19 @@
|
|||
// run-pass
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
pub fn main() {
|
||||
let mut h = HashMap::new();
|
||||
let kvs = [(1, 10), (2, 20), (3, 30)];
|
||||
for &(k,v) in &kvs {
|
||||
h.insert(k,v);
|
||||
}
|
||||
let mut x = 0;
|
||||
let mut y = 0;
|
||||
for (&k,&v) in &h {
|
||||
x += k;
|
||||
y += v;
|
||||
}
|
||||
assert_eq!(x, 6);
|
||||
assert_eq!(y, 60);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue