| 1 |
|
| 2 |
|
| 3 |
#![cfg(test)] |
| 4 |
#![cfg(target_arch = "wasm32")] |
| 5 |
|
| 6 |
extern crate wasm_bindgen_test; |
| 7 |
use std::assert_eq; |
| 8 |
|
| 9 |
use one_ini::parse_to_uint32array; |
| 10 |
use wasm_bindgen_test::*; |
| 11 |
|
| 12 |
wasm_bindgen_test_configure!(run_in_browser); |
| 13 |
|
| 14 |
#[wasm_bindgen_test] |
| 15 |
fn uint32array() { |
| 16 |
let expected: Vec<u32> = vec![0, 0, 4, 1, 5, 9, 2, 11, 12, 0, 14, 15, 1, 16, 17]; |
| 17 |
match parse_to_uint32array(String::from("root=true\n[a]\nb=c").as_bytes()) { |
| 18 |
Ok(v) => assert_eq!(v, expected), |
| 19 |
Err(_) => assert!(false), |
| 20 |
} |
| 21 |
} |