This document gives some examples of the email the submission system will send for common submission errors
Submission compiled and ran successfully
Construction and accessor tests LeastCommonDenominator tests Arithmetic tests Relational/Equality tests operator>> tests Exception handling tests
Submission compiled, partially ran, and crashed in the middle of testing
In this particular case, the recursive GCD function ran infinitely before blowing the stack
Construction and accessor tests LeastCommonDenominator tests ./grade: line 5: 8170 Segmentation fault ./rationaltest > output.dat
Submission compiled and ran sucessfully, but output is different than expected output.
The output below "Exception handling tests" is generated by using the diff command on the output and the expected output. Do "man diff" on csserver for details on the diff output format. In this particular case, the computation for operator- was incorrect.
Construction and accessor tests LeastCommonDenominator tests Arithmetic tests Relational/Equality tests operator>> tests Exception handling tests 18c18 < -6/5 - -4/3 = 2/9 --- > -6/5 - -4/3 = 2/15 22c22 < -4/3 - 1/2 = -11/4 --- > -4/3 - 1/2 = -11/6 26c26 < 1/2 - 2 = -3 --- > 1/2 - 2 = -3/2 30c30 < 2 - 11/4 = -3/16 --- > 2 - 11/4 = -3/4
Submission did not compile due to incorrect use of const.
The output may have strange characters in it. In this particular case, Reciprocal, LeastCommonDenominator, and operator+ have const errors
rationaltest.cpp: In function void TestAccessors(const Rational&): rationaltest.cpp:23: error: passing const Rational as this argument of Rational Rational::Reciprocal() discards qualifiers rationaltest.cpp: In function void TestLCD(const Rational&, const Rational&, const Rational&, const Rational&, const Rational&): rationaltest.cpp:35: error: passing const Rational as this argument of int Rational::LeastCommonDenominator(const Rational&) discards qualifiers rationaltest.cpp:37: error: passing const Rational as this argument of int Rational::LeastCommonDenominator(const Rational&) discards qualifiers rationaltest.cpp:39: error: passing const Rational as this argument of int Rational::LeastCommonDenominator(const Rational&) discards qualifiers rationaltest.cpp:41: error: passing const Rational as this argument of int Rational::LeastCommonDenominator(const Rational&) discards qualifiers rationaltest.cpp:43: error: passing const Rational as this argument of int Rational::LeastCommonDenominator(const Rational&) discards qualifiers rationaltest.cpp:45: error: passing const Rational as this argument of int Rational::LeastCommonDenominator(const Rational&) discards qualifiers rationaltest.cpp:47: error: passing const Rational as this argument of int Rational::LeastCommonDenominator(const Rational&) discards qualifiers rationaltest.cpp:49: error: passing const Rational as this argument of int Rational::LeastCommonDenominator(const Rational&) discards qualifiers rationaltest.cpp: In function void TestArithmeticOps(const Rational&, const Rational&): rationaltest.cpp:54: error: no match for operator+ in r1 + r2 rational.h:29: note: candidates are: Rational operator+(Rational&, Rational&) make: *** [rationaltest.o] Error 1