()
| 59 | } |
| 60 | |
| 61 | fn test_option_roundtrip() { |
| 62 | let mut input = wit_bindgen::rt::Map::new(); |
| 63 | input.insert("some".to_string(), Some(42)); |
| 64 | input.insert("none".to_string(), None); |
| 65 | let result = option_roundtrip(&input); |
| 66 | assert_eq!(result.len(), 2); |
| 67 | assert_eq!(result.get("some"), Some(&Some(42))); |
| 68 | assert_eq!(result.get("none"), Some(&None)); |
| 69 | } |
| 70 | |
| 71 | fn test_record_roundtrip() { |
| 72 | let mut values = NamesById::new(); |