()
| 1825 | |
| 1826 | #[test] |
| 1827 | fn replace_token_success() { |
| 1828 | let mut ptr = PointerBuf::from_tokens(["foo", "bar", "baz"]); |
| 1829 | assert!(ptr.replace(1, "qux").is_ok()); |
| 1830 | assert_eq!(ptr, PointerBuf::from_tokens(["foo", "qux", "baz"])); |
| 1831 | |
| 1832 | assert!(ptr.replace(0, "corge").is_ok()); |
| 1833 | assert_eq!(ptr, PointerBuf::from_tokens(["corge", "qux", "baz"])); |
| 1834 | |
| 1835 | assert!(ptr.replace(2, "quux").is_ok()); |
| 1836 | assert_eq!(ptr, PointerBuf::from_tokens(["corge", "qux", "quux"])); |
| 1837 | } |
| 1838 | |
| 1839 | #[test] |
| 1840 | fn replace_token_out_of_bounds() { |
nothing calls this directly
no test coverage detected