()
| 387 | |
| 388 | #[test] |
| 389 | fn test_string_header() { |
| 390 | rootless_mutate(|mc| { |
| 391 | let test1 = InternedString::from_buffer(mc, Box::from(b"test 1".as_slice())); |
| 392 | let test2 = InternedString::from_buffer(mc, Box::from(b"test 2".as_slice())); |
| 393 | |
| 394 | let test3 = InternedString::from_slice(mc, b"test 3"); |
| 395 | let test4 = InternedString::from_slice(mc, b"test 4444 4444 4444 4444"); |
| 396 | |
| 397 | let test5 = InternedString::from_static(mc, b"test 55555 55555 55555 55555 55555"); |
| 398 | let test6 = InternedString::from_static(mc, b"test 666666"); |
| 399 | |
| 400 | assert_eq!(test1.as_bytes(), b"test 1"); |
| 401 | assert_eq!(test2.as_bytes(), b"test 2"); |
| 402 | assert_eq!(test3.as_bytes(), b"test 3"); |
| 403 | assert_eq!(test4.as_bytes(), b"test 4444 4444 4444 4444"); |
| 404 | assert_eq!(test5.as_bytes(), b"test 55555 55555 55555 55555 55555"); |
| 405 | assert_eq!(test6.as_bytes(), b"test 666666"); |
| 406 | }); |
| 407 | } |
| 408 | } |
nothing calls this directly
no test coverage detected