Description:
[grader] finish engine spec on grading non-zero exit status
git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@127 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r33:e7a6930e8c87 - - 1 file changed: 5 inserted, 1 deleted
@@ -81,25 +81,29 | |||
|
81 | 81 | :comment => /FAILED: [^P]P/}) |
|
82 | 82 | end |
|
83 | 83 | |
|
84 | 84 | it "should score test runs correctly when submission fails in some test case" do |
|
85 | 85 | grader_should(:grade => "add_fail_test_case_1.c", |
|
86 | 86 | :on => @problem_test_normal, |
|
87 | 87 | :and_report => { |
|
88 | 88 | :score => 105, |
|
89 | 89 | :comment => /^FAILED:/}) |
|
90 | 90 | end |
|
91 | 91 | |
|
92 | 92 | it "should fail submission with non-zero exit status" do |
|
93 | - violated("has not been implemented") | |
|
93 | + grader_should(:grade => "add_nonzero_exit_status.c", | |
|
94 | + :on => @problem_test_normal, | |
|
95 | + :and_report => { | |
|
96 | + :score => 0, | |
|
97 | + :comment => /^FAILED:/}) | |
|
94 | 98 | end |
|
95 | 99 | |
|
96 | 100 | def grader_should(args) |
|
97 | 101 | @user1 = stub(User, |
|
98 | 102 | :id => 1, :login => 'user1') |
|
99 | 103 | submission = |
|
100 | 104 | create_submission_from_file(1, @user1, args[:on], args[:grade]) |
|
101 | 105 | submission.should_receive(:graded_at=) |
|
102 | 106 | |
|
103 | 107 | expected_score = args[:and_report][:score] |
|
104 | 108 | expected_comment = args[:and_report][:comment] |
|
105 | 109 | if args[:and_report][:compiler_message]!=nil |
You need to be logged in to leave comments.
Login now