summaryrefslogtreecommitdiff
path: root/yaksh/evaluator_tests/test_c_cpp_evaluation.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/evaluator_tests/test_c_cpp_evaluation.py')
-rw-r--r--yaksh/evaluator_tests/test_c_cpp_evaluation.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/yaksh/evaluator_tests/test_c_cpp_evaluation.py b/yaksh/evaluator_tests/test_c_cpp_evaluation.py
index b15f766..5ff4e4c 100644
--- a/yaksh/evaluator_tests/test_c_cpp_evaluation.py
+++ b/yaksh/evaluator_tests/test_c_cpp_evaluation.py
@@ -350,10 +350,11 @@ class CppStdIOEvaluationTestCases(EvaluatorBaseTest):
result = grader.evaluate(kwargs)
# Then
- lines_of_error = len(result.get('error')[0].splitlines())
+ lines_of_error = len(result.get('error')[0].get('error_line_numbers'))
+ result_error = result.get('error')[0].get('error_msg')
self.assertFalse(result.get('success'))
- self.assert_correct_output("Incorrect", result.get('error'))
- self.assertTrue(lines_of_error > 1)
+ self.assert_correct_output("Incorrect", result_error)
+ self.assertTrue(lines_of_error > 0)
def test_error(self):
# Given
@@ -558,10 +559,11 @@ class CppStdIOEvaluationTestCases(EvaluatorBaseTest):
result = grader.evaluate(kwargs)
# Then
- lines_of_error = len(result.get('error')[0].splitlines())
+ lines_of_error = len(result.get('error')[0].get('error_line_numbers'))
+ result_error = result.get('error')[0].get('error_msg')
self.assertFalse(result.get('success'))
- self.assert_correct_output("Incorrect", result.get('error'))
- self.assertTrue(lines_of_error > 1)
+ self.assert_correct_output("Incorrect", result_error)
+ self.assertTrue(lines_of_error > 0)
def test_cpp_error(self):
# Given