Skip to content

Commit 7da8e9c

Browse files
committed
added a readme file for the tests
1 parent f30de66 commit 7da8e9c

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

tests/README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
## C-data-structures Project - Tests
2+
3+
This project contains a collection of data structures implemented in C. This README file focuses on the compilation process for the test suite of these data structures.
4+
5+
### Compilation
6+
7+
To compile the tests for the data structures, you can use the provided Makefile. The Makefile is configured to build test executables for each data structure.
8+
9+
#### Prerequisites
10+
11+
Ensure that you have the following installed on your system:
12+
13+
- GCC (GNU Compiler Collection)
14+
15+
#### Compilation Steps
16+
17+
1. Open a terminal or command prompt.
18+
19+
2. Navigate to the root directory of the project (where the Makefile is located).
20+
21+
3. To build all the test executables for the data structures, use the following command:
22+
23+
```bash
24+
make all
25+
```
26+
27+
This will compile all the test files for each data structure and generate corresponding executable files.
28+
29+
Test Executables
30+
The Makefile generates individual test executables for each data structure. Below is a list of the data structure test executables that will be generated:
31+
32+
- AVLTree_test
33+
- BloomFilter_test
34+
- DH_Hashtable_test
35+
- DoubleLinkedList_test
36+
- PriorityQueue_test
37+
- Queue_test
38+
- RedBlackTree_test
39+
- ChainingHashTable_test
40+
- SkipList_test
41+
- Stack_test
42+
- Vector_test
43+
44+
### Running Tests
45+
After successfully compiling the test executables, you can run them to verify the correctness and functionality of the data structures.
46+
47+
To execute a particular test, simply type the name of the corresponding executable in the terminal and press Enter. For example, to run tests for the AVL tree, use:
48+
49+
```bash
50+
./AVLTree_test
51+
```
52+
53+
Similarly, you can run tests for other data structures by executing their respective test executables.
54+
55+
56+
### Cleaning Up
57+
To remove the compiled object files and executables, you can use the following command:
58+
```bash
59+
make clean
60+
```
61+
62+
This will delete all the generated object files and test executables, leaving the project directory clean.
63+
64+
65+
That's it! You should now have the data structures test suite compiled and ready to run. Feel free to explore and test the functionalities of each data structure.

0 commit comments

Comments
 (0)