File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,11 @@ std::string read_file(FILE* file) {
6363bool compare_files (FILE* expected, FILE* actual) {
6464 std::string expected_content = read_file (expected);
6565 std::string actual_content = read_file (actual);
66-
67- std::cout << " Expected File: " << expected_content << ' \n ' ;
68- std::cout << " Output: " << actual_content << ' \n ' ;
66+
67+ if (expected_content != actual_content) {
68+ std::cout << " Expected File: " << expected_content << ' \n ' ;
69+ std::cout << " Output: " << actual_content << ' \n ' ;
70+ }
6971
7072 return expected_content == actual_content;
7173}
@@ -159,11 +161,9 @@ int run_test(const std::string& cmd,
159161
160162 if (expected_stderr) {
161163 full_cmd = resolved_cmd + " > \" " + stdout_path + " \" 2> \" " + stderr_path + " \" " ;
162- std::cout << " [exec] " << full_cmd << ' \n ' ;
163164
164165 } else {
165166 full_cmd = resolved_cmd + " > \" " + stdout_path + " \" " ;
166- std::cout << " [exec] " << full_cmd << ' \n ' ;
167167 }
168168
169169 int exit_code = std::system (full_cmd.c_str ());
You can’t perform that action at this time.
0 commit comments