File tree Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ class Fraction {
3535
3636// ADD YOUR CODE HERE
3737
38+ // This is using the cpp, the C preprocessor to expand a bit of code
39+ // (the what argument) to a pair containing a string representation
40+ // of it and the code itself. That way, print is given a string and a
41+ // value where the string is the code that lead to the value
3842#define CHECK (print,what ) print(#what, what)
3943
4044unsigned int WIDTH {20 };
Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ class TestResultPrinter {
5353
5454};
5555
56+ // This is using the cpp, the C preprocessor to expand a bit of code
57+ // (the what argument) to a pair containing a string representation
58+ // of it and the code itself. That way, print is given a string and a
59+ // value where the string is the code that lead to the value
5660#define CHECK (printer,what ) printer.process(#what, what)
5761
5862int main () {
Original file line number Diff line number Diff line change @@ -58,6 +58,10 @@ class TestResultPrinter {
5858
5959};
6060
61+ // This is using the cpp, the C preprocessor to expand a bit of code
62+ // (the what argument) to a pair containing a string representation
63+ // of it and the code itself. That way, print is given a string and a
64+ // value where the string is the code that lead to the value
6165#define CHECK (printer,what ) printer.process(#what, what)
6266
6367int main () {
Original file line number Diff line number Diff line change @@ -69,6 +69,10 @@ class TestResultPrinter {
6969
7070};
7171
72+ // This is using the cpp, the C preprocessor to expand a bit of code
73+ // (the what argument) to a pair containing a string representation
74+ // of it and the code itself. That way, print is given a string and a
75+ // value where the string is the code that lead to the value
7276#define CHECK (printer,what ) printer(#what, what)
7377
7478int main () {
You can’t perform that action at this time.
0 commit comments