MCPcopy Create free account
hub / github.com/concensure/Semantic / generates_ast_patch_and_preview_diff

Function generates_ast_patch_and_preview_diff

patch_engine/src/lib.rs:322–336  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

320
321 #[test]
322 fn generates_ast_patch_and_preview_diff() {
323 let patch = PatchEngine::generate_ast_patch(
324 "src/client.ts",
325 "retryRequest",
326 ASTTransformation::ReplaceFunctionBody,
327 );
328 match &patch.representation {
329 PatchRepresentation::ASTTransform(edit) => {
330 let diff = PatchEngine::ast_to_diff(&patch.file_path, edit);
331 assert!(diff.contains("retryRequest"));
332 assert!(diff.contains("AST_EDIT"));
333 }
334 PatchRepresentation::UnifiedDiff(_) => panic!("expected ast transform"),
335 }
336 }
337
338 #[test]
339 fn replacement_patch_round_trips_and_validates() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…