forked from sysprog21/lab0-c
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
C Programming Lab: Assessing Your C Programming Skills
- Loading branch information
0 parents
commit 542c9b7
Showing
29 changed files
with
2,820 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
BasedOnStyle: Chromium | ||
Language: Cpp | ||
MaxEmptyLinesToKeep: 3 | ||
IndentCaseLabels: false | ||
AllowShortIfStatementsOnASingleLine: false | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortLoopsOnASingleLine: false | ||
DerivePointerAlignment: false | ||
PointerAlignment: Right | ||
SpaceAfterCStyleCast: true | ||
TabWidth: 4 | ||
UseTab: Never | ||
IndentWidth: 4 | ||
BreakBeforeBraces: Linux | ||
AccessModifierOffset: -4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
CC = gcc | ||
CFLAGS = -O0 -g -Wall -Werror | ||
|
||
all: qtest | ||
-tar -cf handin.tar queue.c queue.h | ||
|
||
queue.o: queue.c queue.h harness.h | ||
$(CC) $(CFLAGS) -c queue.c | ||
|
||
qtest: qtest.c report.c console.c harness.c queue.o | ||
$(CC) $(CFLAGS) -o qtest qtest.c report.c console.c harness.c queue.o | ||
tar cf handin.tar queue.c queue.h | ||
|
||
test: qtest driver.py | ||
chmod +x driver.py | ||
./driver.py | ||
|
||
clean: | ||
rm -f *.o *~ qtest | ||
rm -rf *.dSYM | ||
(cd traces; rm -f *~) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
This is the handout directory for the 15-213 C Lab. | ||
|
||
************************ | ||
Running the autograders: | ||
************************ | ||
|
||
Before running the autograders, compile your code to create the testing program qtest | ||
linux> make | ||
|
||
Check the correctness of your code: | ||
linux> make test | ||
|
||
****** | ||
Using qtest: | ||
****** | ||
|
||
qtest provides a command interpreter that can create and manipulate queues. | ||
|
||
Run ./qtest -h to see the list of command-line options | ||
|
||
When you execute ./qtest, it will give a command prompt "cmd>". Type | ||
"help" to see a list of available commands | ||
|
||
|
||
****** | ||
Files: | ||
****** | ||
|
||
# You will handing in these two files | ||
queue.h Modified version of declarations including new fields you want to introduce | ||
queue.c Modified version of queue code to fix deficiencies of original code | ||
|
||
# Tools for evaluating your queue code | ||
Makefile Builds the evaluation program qtest | ||
README This file | ||
driver.py* The C lab driver program, runs qtest on a standard set of traces | ||
|
||
# Helper files | ||
|
||
console.{c,h}: Implements command-line interpreter for qtest | ||
report.{c,h}: Implements printing of information at different levels of verbosity | ||
harness.{c,h}: Customized version of malloc and free to provide rigorous testing framework | ||
qtest.c Code for qtest | ||
|
||
# Trace files | ||
|
||
traces/trace-XX-CAT.cmd Trace files used by the driver. These are input files for qtest. | ||
They are short and simple. We encourage to study them to see what tests are being performed. | ||
XX is the trace number (1-15). CAT describes the general nature of the test. | ||
|
||
traces/trace-eg.cmd: A simple, documented trace file to demonstrate the operation of qtest |
Oops, something went wrong.