Skip to content

Commit 8782853

Browse files
author
Divjot Arora
committed
Updated README to include test order
1 parent 1e8c4b0 commit 8782853

File tree

6 files changed

+24
-5
lines changed

6 files changed

+24
-5
lines changed

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ Contributors:
88
* May "may" Hoque <mehrabhoque@gmail.com>
99
* Jaykumar "jappatel" Patel <jappatel@cs.stonybrook.edu>
1010
* Jack "jackzheng2496" Zheng <jackzheng2496@gmail.com>
11+
* Divjot "d-arora" Arora <divjot.arora@gmail.com>
12+
* Mrunal "mkpatel" Patel <mkpatel@cs.stonybrook.edu>

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,17 @@ Inside `src/` you will find a file for each of the following topics in C:
3232
- I/O: Open (read, write, append), Read, Write, Close, Dup2
3333
- Malloc: Dynamic memory allocation vs Stack, calloc, realloc, free
3434
- Linked List Project: This one will be left for you to implement we have given all the unit tests for it, its a small culminating project that uses all you've learned from these tests.
35+
36+
The recommended order for fixing the tests is:
37+
- about_basics.c
38+
- about_control_statements.c
39+
- about_functions.c
40+
- about_pointers.c
41+
- about_malloc.c
42+
- about_arrays.c
43+
- about_strings.c
44+
- about_structs.c
45+
- about_dataclasses.c
46+
- about_io.c
47+
- about_linked_lists.c
48+
- about_preprocessor.c

include/c_koans.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ int modify_global();
2626
int modify_local();
2727
int modify_local_static();
2828

29-
struct person make_person(const char*,int,int,int);
30-
int make_person_better(struct person*,const char*,int,int,int);
29+
struct person make_person(const char *, int, int, int);
30+
int make_person_better(struct person *, const char *, int, int, int);
3131
#endif

src/about_dataclasses.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Test(about_dataclasses, bit_fields)
122122
unsigned int is_offered : 1;
123123
};
124124

125-
struct course cse101 = {101, 'E', 'S', 'C', 1};
125+
struct course cse101 = { 101, 'E', 'S', 'C', 1 };
126126

127127
cr_assert_eq(*(unsigned int *)(&cse101), TODO,
128128
"Determine the hex value of "

src/about_pointers.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Test(about_pointers, pointers_and_addresses)
3636
* '*'.
3737
*/
3838

39+
// DON'T DELETE THE CLANG-FORMAT LINES
3940
// clang-format off
4041
int k, *l;
4142
int* m, n;

src/about_strings.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ Test(about_strings, what_is_string)
3030
Test(about_strings, reference_characters)
3131
{
3232
/*
33-
* A String is just like an array of chars. All ways of dereferencing arrays will
33+
* A String is just like an array of chars. All ways of dereferencing arrays
34+
* will
3435
* work with strings
3536
*/
3637
char *string = "CSE101 is awesome";
@@ -131,7 +132,8 @@ void test_a_string_length_with_sizeof(char *string)
131132
Test(about_strings, function_paramater)
132133
{
133134
/*
134-
* sizeof can give different results when strings are passed in as parameters,
135+
* sizeof can give different results when strings are passed in as
136+
* parameters,
135137
* but strlen will always give the length of the string.
136138
*/
137139
char string[] = { 'C', 'S', 'E', '\0' };

0 commit comments

Comments
 (0)