MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_json_roundtrip

Function test_json_roundtrip

atomic-core/src/change/encoding.rs:504–516  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

502
503 #[test]
504 fn test_json_roundtrip() {
505 for encoding in [
506 Encoding::Utf8,
507 Encoding::Utf16Le,
508 Encoding::Utf16Be,
509 Encoding::Latin1,
510 Encoding::Binary,
511 ] {
512 let json = serde_json::to_string(&encoding).unwrap();
513 let parsed: Encoding = serde_json::from_str(&json).unwrap();
514 assert_eq!(encoding, parsed);
515 }
516 }
517
518 #[test]
519 fn test_json_values() {

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected