| 1 | //! Test suite for Node.js |
| 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] |
| 13 | fn uint32array() { |
| 14 | let expected: Vec<u32> = vec![0, 0, 4, 1, 5, 9, 2, 11, 12, 0, 14, 15, 1, 16, 17]; |
| 15 | match parse_to_uint32array(String::from("root=true\n[a]\nb=c").as_bytes()) { |
| 16 | Ok(v) => assert_eq!(v, expected), |
| 17 | Err(_) => assert!(false), |
| 18 | } |
| 19 | } |