From 442a49ad5a48d417345959b903ae6a6d32d55759 Mon Sep 17 00:00:00 2001 From: Haidong Ji Date: Fri, 15 Apr 2022 15:51:30 -0500 Subject: Great C programming fun Excellent fundamentals and displine training, many tools and techniques exercises: gdb, emacs, valgrind, git --- 15_tests_subseq/README | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 15_tests_subseq/README (limited to '15_tests_subseq/README') diff --git a/15_tests_subseq/README b/15_tests_subseq/README new file mode 100644 index 0000000..9c98da7 --- /dev/null +++ b/15_tests_subseq/README @@ -0,0 +1,24 @@ +For this assignment, you will be writing testcases for +your next assignment (as usual, the instructions for that assignment +can be found in next-README). + +As usual, one correct and many broken implementations can be found +in /usr/local/l2p/subseq. + +As with power, these are provided as compiled object files, and you +should write a C program (in test-subseq.c) whose main function tests +the maxSeq function. As before, it should exit with EXIT_SUCCESS if all +tests pass, and EXIT_FAILURE if any test fails. Note that you will +need to write the prototype for maxSeq: + + size_t maxSeq(int * array, size_t n); + +in your test-subseq.c file, so that the compiler knows about the +maxSeq function. The correct place to put it is after you #include +any .h files you need, but before any other code you write. + +We have provided run_all.sh to help you run your test cases against +all implementations. + +HINT: Think about how can you can vary not just the values in your array +but the size as well. What about how the values change over time? -- cgit v1.2.3