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

Function test_side_by_side_identical

atomic-core/src/diff/display.rs:919–932  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

917
918 #[test]
919 fn test_side_by_side_identical() {
920 let content = b"line1\nline2\n";
921 let diff = SideBySideDiff::new(content, content, Algorithm::Myers);
922
923 let pairs: Vec<_> = diff.pairs().collect();
924 assert_eq!(pairs.len(), 2);
925
926 for pair in pairs {
927 assert!(pair.old_line.is_some());
928 assert!(pair.new_line.is_some());
929 assert!(!pair.is_change());
930 assert!(pair.is_unchanged());
931 }
932 }
933
934 #[test]
935 fn test_side_by_side_changes() {

Callers

nothing calls this directly

Calls 1

pairsMethod · 0.80

Tested by

no test coverage detected