| 16 | |
| 17 | #[test] |
| 18 | fn test_basic_method_calls() { |
| 19 | let data = TestData { |
| 20 | text: "hello world".to_string(), |
| 21 | numbers: vec![1, 2, 3], |
| 22 | maybe_value: Some("test".to_string()), |
| 23 | result_value: Ok(42), |
| 24 | map: { |
| 25 | let mut m = HashMap::new(); |
| 26 | m.insert("key1".to_string(), 10); |
| 27 | m.insert("key2".to_string(), 20); |
| 28 | m |
| 29 | }, |
| 30 | tuple_data: ( |
| 31 | vec!["a".to_string(), "b".to_string()], |
| 32 | "middle".to_string(), |
| 33 | Some(99), |
| 34 | ), |
| 35 | }; |
| 36 | |
| 37 | // Test basic method calls |
| 38 | assert_struct!(data, TestData { |
| 39 | text.len(): 11, |
| 40 | numbers.len(): 3, |
| 41 | maybe_value.is_some(): true, |
| 42 | result_value.is_ok(): true, |
| 43 | map.len(): 2, |
| 44 | .. |
| 45 | }); |
| 46 | } |
| 47 | |
| 48 | #[test] |
| 49 | fn test_tuple_method_calls() { |