]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-3559.rs
Merge commit 'a8385522ade6f67853edac730b5bf164ddb298fd' into simd-remove-autosplats
[rust.git] / src / test / ui / issues / issue-3559.rs
1 // run-pass
2 use std::collections::HashMap;
3
4 fn check_strs(actual: &str, expected: &str) -> bool {
5     if actual != expected {
6         println!("Found {}, but expected {}", actual, expected);
7         return false;
8     }
9     return true;
10 }
11
12 pub fn main() {
13     let mut table = HashMap::new();
14     table.insert("one".to_string(), 1);
15     table.insert("two".to_string(), 2);
16     assert!(check_strs(&format!("{:?}", table), "{\"one\": 1, \"two\": 2}") ||
17             check_strs(&format!("{:?}", table), "{\"two\": 2, \"one\": 1}"));
18 }