Skip to content

Commit

Permalink
Add runtime error
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Jul 18, 2024
1 parent 201d060 commit d73aad9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tested/manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def read_config() -> DodonaConfig:
programming_language=SupportedLanguage("cpp"),
natural_language="nl",
resources=Path(exercise_dir, "evaluation"),
source=Path(exercise_dir, "solution/correct.cpp"),
source=Path(exercise_dir, "solution/run-error.cpp"),
judge=Path("."),
workdir=Path("workdir"),
test_suite="two.tson",
Expand Down
20 changes: 20 additions & 0 deletions tests/exercises/echo/solution/run-error.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

#include <iostream>

using namespace std;

int main() {
int x = 1;
int y = 0;
int z = x/y;

string input;

// Read a line from standard input
getline(cin, input);

// Output the same line
cout << input << endl;

return 0;
}

0 comments on commit d73aad9

Please sign in to comment.