Skip to content

Commit 668bd0b

Browse files
committed
Fixing test errors
1 parent 84a5d5b commit 668bd0b

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

crates/cli/src/commands/compare.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ fn extract_functions_from_ast(ast: &smart_diff_parser::ASTNode) -> Vec<smart_dif
717717
let signature = FunctionSignature {
718718
name: name.clone(),
719719
parameters: Vec::new(), // Simplified for now
720-
return_type: smart_diff_parser::Type::Primitive("void".to_string()),
720+
return_type: smart_diff_parser::Type::new("void".to_string()),
721721
modifiers: Vec::new(),
722722
generic_parameters: Vec::new(),
723723
};
@@ -733,7 +733,7 @@ fn extract_functions_from_ast(ast: &smart_diff_parser::ASTNode) -> Vec<smart_dif
733733
end_column: node.metadata.column,
734734
},
735735
dependencies: Vec::new(),
736-
hash: 0, // Simplified for now
736+
hash: "0".to_string(), // Simplified for now
737737
};
738738

739739
functions.push(function);

crates/cli/src/commands/doctor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ async fn check_parser_system(term: &Term, fix: bool, quiet: bool) -> Result<(usi
110110
];
111111

112112
for (filename, expected) in test_cases {
113-
let detected = language_detector.detect_from_path(std::path::Path::new(filename));
113+
let detected = LanguageDetector::detect_from_path(std::path::Path::new(filename));
114114
if detected != expected {
115115
issues += 1;
116116
if !quiet {
@@ -235,7 +235,7 @@ async fn check_diff_engine(term: &Term, fix: bool, quiet: bool) -> Result<(usize
235235
// Test diff engine creation
236236
let languages = vec![Language::Java, Language::Python, Language::JavaScript, Language::Cpp, Language::C];
237237

238-
for lang in languages {
238+
for lang in &languages {
239239
match std::panic::catch_unwind(|| DiffEngine::new()) {
240240
Ok(_engine) => {
241241
if !quiet {

crates/cli/src/output.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,8 @@ impl OutputFormatter {
341341
smart_diff_parser::ChangeType::Rename => change_desc.blue(),
342342
smart_diff_parser::ChangeType::Move => change_desc.magenta(),
343343
smart_diff_parser::ChangeType::CrossFileMove => change_desc.cyan(),
344+
smart_diff_parser::ChangeType::Split => change_desc.purple(),
345+
smart_diff_parser::ChangeType::Merge => change_desc.purple(),
344346
};
345347
output.push_str(&format!("{}\n", colored_desc));
346348
}
@@ -515,6 +517,8 @@ impl OutputFormatter {
515517
smart_diff_parser::ChangeType::Rename => "rename",
516518
smart_diff_parser::ChangeType::Move => "move",
517519
smart_diff_parser::ChangeType::CrossFileMove => "cross-file-move",
520+
smart_diff_parser::ChangeType::Split => "split",
521+
smart_diff_parser::ChangeType::Merge => "merge",
518522
};
519523

520524
html.push_str(&format!(" <li class=\"change-item {}\">\n", class_name));

0 commit comments

Comments
 (0)