From 1a4a0e6dc315eb81e737f752c42df542c649c3fd Mon Sep 17 00:00:00 2001 From: Rayquaza1 <50589232+Rayquaza1@users.noreply.github.com> Date: Tue, 18 Nov 2025 14:24:48 +0300 Subject: [PATCH 01/11] fixes for stack.h and stack.c --- 05_hw/stack.c | 14 ++++++++++++-- 05_hw/stack.h | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/05_hw/stack.c b/05_hw/stack.c index 0964440..71fd72e 100644 --- a/05_hw/stack.c +++ b/05_hw/stack.c @@ -5,6 +5,10 @@ Node* createNode(int data) { Node* newNode = (Node*)malloc(sizeof(Node)); + if (newNode == NULL){ + printf("malloc failure"); + exit(EXIT_FAILURE); + } newNode->data = data; newNode->next = NULL; return newNode; @@ -17,10 +21,11 @@ void initStack(Stack* stack) { void destroyStack(Stack* stack) { Node* current = stack->top; while (current != NULL) { - Node *tmp = current; + Node* tmp = current; current = current->next; free(tmp); } + stack->top = NULL; } void push(Stack* stack, int data) { @@ -30,8 +35,13 @@ void push(Stack* stack, int data) { } void pop(Stack* stack) { + if (stack->top == NULL){ + printf("Attempting to pop an empty stack\n"); + return; + } Node* temp = stack->top; stack->top = stack->top->next; + free(temp); } Node* searchByValue(Stack* stack, int value) { @@ -40,6 +50,7 @@ Node* searchByValue(Stack* stack, int value) { if (current->data == value) { return current; } + current = current->next; } return NULL; } @@ -72,7 +83,6 @@ void traverseStack(Stack* stack) { } bool isEmpty(Stack* stack) { - free(stack->top); return stack->top == NULL; } diff --git a/05_hw/stack.h b/05_hw/stack.h index ef0734e..8228d4b 100644 --- a/05_hw/stack.h +++ b/05_hw/stack.h @@ -19,7 +19,7 @@ Node* createNode(int data); void initStack(Stack* stack); -void destroyStack(Stack *stack); +void destroyStack(Stack* stack); void push(Stack* stack, int data); From ae1512928299049b83a1c41884a30772ef529487 Mon Sep 17 00:00:00 2001 From: Rayquaza1 <50589232+Rayquaza1@users.noreply.github.com> Date: Tue, 18 Nov 2025 14:28:25 +0300 Subject: [PATCH 02/11] add benchmarks for pop() and push() --- 05_hw/benchmarks.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 05_hw/benchmarks.c diff --git a/05_hw/benchmarks.c b/05_hw/benchmarks.c new file mode 100644 index 0000000..555fa04 --- /dev/null +++ b/05_hw/benchmarks.c @@ -0,0 +1,73 @@ +#include +#include +#include + +#include "stack.h" +#include "stack.c" + +void benchmark_push(Stack* stack, int ITEMS){ + //Start the clock + clock_t start = clock(); + + //Push X elements + for (int i = 0; i < ITEMS; i++){ + push(stack, i); + } + + //Stop the clock + clock_t end = clock(); + + //Calculate the time + float benchmark_time = (float)(end - start) / CLOCKS_PER_SEC; + + printf("Time taken to complete push benchmark (%d elements): %.5f seconds\n", ITEMS, benchmark_time); + +} + +void benchmark_pop(Stack* stack, int ITEMS){ + + //Start the clock + clock_t start = clock(); + + + //Pop X elements + for (int i = 0; i < ITEMS; i++){ + pop(stack); + } + + //Stop the clock + clock_t end = clock(); + + //Calculate the time + float benchmark_time = (float)(end - start) / CLOCKS_PER_SEC; + + printf("Time taken to complete pop benchmark (%d elements): %.5f seconds\n", ITEMS, benchmark_time); + +} + +int main(){ + + //Test with different num of elements + int NUMBER_TESTS[] = {1000, 10000, 1000000}; + + + //Do 3 benchmarks + for (int i = 0; i < 3; i++){ + //Stack init + Stack stack; + initStack(&stack); + + benchmark_push(&stack, NUMBER_TESTS[i]); + + for (int i = 0; i < NUMBER_TESTS[i]; i++){ + push(&stack, i); + } + + benchmark_pop(&stack, NUMBER_TESTS[i]); + + destroyStack(&stack); + } + + return 0; + +} \ No newline at end of file From b8e8d9a5f3dab193189b3c98d0749d66af6a6be3 Mon Sep 17 00:00:00 2001 From: Rayquaza1 <50589232+Rayquaza1@users.noreply.github.com> Date: Tue, 18 Nov 2025 14:30:01 +0300 Subject: [PATCH 03/11] add tests --- 05_hw/tests.c | 286 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 286 insertions(+) create mode 100644 05_hw/tests.c diff --git a/05_hw/tests.c b/05_hw/tests.c new file mode 100644 index 0000000..2a192d9 --- /dev/null +++ b/05_hw/tests.c @@ -0,0 +1,286 @@ +#include +#include +#include + +#include "stack.h" +#include "stack.c" + + +//Test destroyStack() +void test_destroyStack(){ + Stack stack; + initStack(&stack); + + push(&stack, 1); + push(&stack, 2); + + destroyStack(&stack); + assert(stack.top == NULL); + + printf("test_destroyStack() passed\n"); + +} + +void test_destroyStack_empty(){ + Stack stack; + initStack(&stack); + + destroyStack(&stack); + assert(stack.top == NULL); + + printf("test_destroyStack_empty() passed\n"); + +} + +//Test push() +void test_push(){ + + Stack stack; + initStack(&stack); + + push(&stack, 1); + assert(stack.top != NULL); + + printf("test_push() passed\n"); + +} + +//Test pop() +void test_pop(){ + + Stack stack; + initStack(&stack); + + push(&stack, 1); + pop(&stack); + assert(stack.top == NULL); + + printf("test_pop() passed\n"); + +} + +void test_pop_empty(){ + + Stack stack; + initStack(&stack); + + pop(&stack); + + printf("test_pop_empty() passed\n"); + +} + +//Test searchByValue() +void test_searchByValue_existing(){ + Stack stack; + initStack(&stack); + + push(&stack, 1); + push(&stack, 2); + push(&stack, 3); + push(&stack, 4); + push(&stack, 5); + + Node* result = searchByValue(&stack, 5); + assert(result != NULL && result->data == 5); + + printf("test_searchByValue_existing() passed\n"); + +} + +void test_searchByValue_nonexisting(){ + Stack stack; + initStack(&stack); + + push(&stack, 1); + push(&stack, 2); + push(&stack, 3); + push(&stack, 4); + push(&stack, 5); + + Node* result = searchByValue(&stack, 10); + assert(result == NULL); + + printf("test_searchByValue_nonexisting() passed\n"); + +} + +void test_searchByValue_empty(){ + Stack stack; + initStack(&stack); + + Node* result = searchByValue(&stack, 10); + assert(result == NULL); + + printf("test_searchByValue_empty() passed\n"); + +} + +//Test searchByIndex() +void test_searchByIndex_existing(){ + Stack stack; + initStack(&stack); + + push(&stack, 1); + push(&stack, 2); + push(&stack, 3); + push(&stack, 4); + push(&stack, 5); + + Node* result = searchByIndex(&stack, 2); + assert(result != NULL && result->data == 3); + + printf("test_searchByIndex_existing() passed\n"); + +} + +void test_searchByIndex_nonexisting(){ + Stack stack; + initStack(&stack); + + push(&stack, 1); + push(&stack, 2); + push(&stack, 3); + push(&stack, 4); + push(&stack, 5); + + Node* result = searchByIndex(&stack, 10); + assert(result == NULL); + + printf("test_searchByIndex_nonexisting() passed\n"); + +} + +void test_searchByIndex_empty(){ + Stack stack; + initStack(&stack); + + Node* result = searchByIndex(&stack, 10); + assert(result == NULL); + + printf("test_earchByIndex_empty() passed\n"); + +} + +//Test getTop() +void test_getTop(){ + Stack stack; + initStack(&stack); + + push(&stack, 1); + push(&stack, 2); + push(&stack, 3); + push(&stack, 4); + push(&stack, 5); + + Node* result = getTop(&stack); + assert(result != NULL && result->data == 5); + + printf("test_getTop() passed\n"); + +} + +void test_getTop_empty(){ + Stack stack; + initStack(&stack); + + Node* result = getTop(&stack); + assert(result == NULL); + + printf("test_getTop_empty() passed\n"); + +} + +//Test traverseStack() +void test_traverseStack(){ + Stack stack; + initStack(&stack); + + push(&stack, 1); + push(&stack, 2); + push(&stack, 3); + push(&stack, 4); + push(&stack, 5); + + printf("Expected result: 5 4 3 2 1\n"); + printf("Function output:"); + traverseStack(&stack); + + printf("test_traverseStack() passed\n"); + +} + +void test_traverseStack_empty(){ + Stack stack; + initStack(&stack); + + printf("Expected result: ' '\n"); + printf("Function output:"); + traverseStack(&stack); + + printf("test_traverseStack_empty() passed\n"); + +} + +//Test isEmpty() +void test_isEmpty(){ + Stack stack; + initStack(&stack); + + push(&stack, 1); + push(&stack, 2); + push(&stack, 3); + push(&stack, 4); + push(&stack, 5); + + assert(isEmpty(&stack) == false); + + printf("test_isEmpty() passed\n"); +} + +void test_isEmpty_empty(){ + Stack stack; + initStack(&stack); + + assert(isEmpty(&stack) == true); + + printf("test_isEmpty_empty() passed\n"); +} + +int main(){ + + printf("\n"); + test_destroyStack(); + test_destroyStack_empty(); + + printf("\n"); + test_push(); + test_pop(); + test_pop_empty(); + + printf("\n"); + test_searchByValue_existing(); + test_searchByValue_nonexisting(); + test_searchByValue_empty(); + + printf("\n"); + test_searchByIndex_existing(); + test_searchByIndex_nonexisting(); + test_searchByIndex_empty(); + + printf("\n"); + test_getTop(); + test_getTop_empty(); + + printf("\n"); + test_traverseStack(); + test_destroyStack_empty(); + + printf("\n"); + test_isEmpty(); + test_isEmpty_empty(); + + printf("\n"); + printf("All tests passed\n"); + +} \ No newline at end of file From 82a2533c0c3a17628d243273a90e5be7c2fa7854 Mon Sep 17 00:00:00 2001 From: Rayquaza1 <50589232+Rayquaza1@users.noreply.github.com> Date: Wed, 19 Nov 2025 13:51:52 +0300 Subject: [PATCH 04/11] used a static analyzer, added fixes --- 05_hw/main.c | 5 +++-- 05_hw/report.txt | 17 +++++++++++++++++ 05_hw/stack.c | 4 ++-- 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 05_hw/report.txt diff --git a/05_hw/main.c b/05_hw/main.c index fded814..50168df 100644 --- a/05_hw/main.c +++ b/05_hw/main.c @@ -1,6 +1,7 @@ #include "stack.h" #include +#include "stack.c" int main() { Stack stack; @@ -18,14 +19,14 @@ int main() { printf("After popping an element:\n"); traverseStack(&stack); - Node* searchResult = searchByValue(&stack, 20); + const Node* searchResult = searchByValue(&stack, 20); if (searchResult != NULL) { printf("Element with value 20 found.\n"); } else { printf("Element with value 20 not found.\n"); } - Node* topElement = getTop(&stack); + const Node* topElement = getTop(&stack); if (topElement != NULL) { printf("Top element: %d\n", topElement->data); } diff --git a/05_hw/report.txt b/05_hw/report.txt new file mode 100644 index 0000000..aa38cd4 --- /dev/null +++ b/05_hw/report.txt @@ -0,0 +1,17 @@ +Running: cppcheck --enable=all --template={"file":"{file}","line":{line},"column":{column},"severity":"{severity}","message":"{message}","id":"{id}"}, c:\Users\User\Desktop\works\lecture-testing-task-main\05_hw\main.c +Checking c:\Users\User\Desktop\works\lecture-testing-task-main\05_hw\main.c ... + +{"file":"c:\Users\User\Desktop\works\lecture-testing-task-main\05_hw\stack.h","line":3,"column":0,"severity":"information","message":"Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results.","id":"missingIncludeSystem"}, +{"file":"c:\Users\User\Desktop\works\lecture-testing-task-main\05_hw\main.c","line":3,"column":0,"severity":"information","message":"Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results.","id":"missingIncludeSystem"}, +{"file":"c:\Users\User\Desktop\works\lecture-testing-task-main\05_hw\stack.c","line":1,"column":0,"severity":"information","message":"Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results.","id":"missingIncludeSystem"}, +{"file":"c:\Users\User\Desktop\works\lecture-testing-task-main\05_hw\stack.c","line":2,"column":0,"severity":"information","message":"Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results.","id":"missingIncludeSystem"}, + +{"file":"c:\Users\User\Desktop\works\lecture-testing-task-main\05_hw\main.c","line":22,"column":11,"severity":"style","message":"Variable 'searchResult' can be declared as pointer to const","id":"constVariablePointer"}, +{"file":"c:\Users\User\Desktop\works\lecture-testing-task-main\05_hw\main.c","line":29,"column":11,"severity":"style","message":"Variable 'topElement' can be declared as pointer to const","id":"constVariablePointer"}, +{"file":"c:\Users\User\Desktop\works\lecture-testing-task-main\05_hw\stack.c","line":71,"column":21,"severity":"style","message":"Parameter 'stack' can be declared as pointer to const","id":"constParameterPointer"}, +{"file":"c:\Users\User\Desktop\works\lecture-testing-task-main\05_hw\stack.c","line":85,"column":21,"severity":"style","message":"Parameter 'stack' can be declared as pointer to const","id":"constParameterPointer"}, + +{"file":"c:\Users\User\Desktop\works\lecture-testing-task-main\05_hw\stack.c","line":21,"column":6,"severity":"style","message":"The function 'destroyStack' is never used.","id":"unusedFunction"}, +{"file":"c:\Users\User\Desktop\works\lecture-testing-task-main\05_hw\stack.c","line":58,"column":7,"severity":"style","message":"The function 'searchByIndex' is never used.","id":"unusedFunction"}, +{"file":"c:\Users\User\Desktop\works\lecture-testing-task-main\05_hw\stack.c","line":85,"column":6,"severity":"style","message":"The function 'isEmpty' is never used.","id":"unusedFunction"}, +{"file":"c:\Users\User\Desktop\works\lecture-testing-task-main\05_hw\stack.c","line":6,"column":7,"severity":"style","message":"The function 'createNode' should have static linkage since it is not used outside of its translation unit.","id":"staticFunction"}, \ No newline at end of file diff --git a/05_hw/stack.c b/05_hw/stack.c index 71fd72e..97725da 100644 --- a/05_hw/stack.c +++ b/05_hw/stack.c @@ -68,7 +68,7 @@ Node* searchByIndex(Stack* stack, int index) { return NULL; } -Node* getTop(Stack* stack) { +Node* getTop(const Stack* stack) { return stack->top; } @@ -82,7 +82,7 @@ void traverseStack(Stack* stack) { printf("\n"); } -bool isEmpty(Stack* stack) { +bool isEmpty(const Stack* stack) { return stack->top == NULL; } From 834aa443b5858eefa189dbc28736c2537ed809c2 Mon Sep 17 00:00:00 2001 From: Rayquaza1 <50589232+Rayquaza1@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:18:28 +0300 Subject: [PATCH 05/11] used a sanitizer, fixed memory leaks in tests --- 05_hw/tests.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/05_hw/tests.c b/05_hw/tests.c index 2a192d9..7822630 100644 --- a/05_hw/tests.c +++ b/05_hw/tests.c @@ -41,6 +41,8 @@ void test_push(){ push(&stack, 1); assert(stack.top != NULL); + destroyStack(&stack); + printf("test_push() passed\n"); } @@ -55,6 +57,8 @@ void test_pop(){ pop(&stack); assert(stack.top == NULL); + destroyStack(&stack); + printf("test_pop() passed\n"); } @@ -66,6 +70,8 @@ void test_pop_empty(){ pop(&stack); + destroyStack(&stack); + printf("test_pop_empty() passed\n"); } @@ -84,6 +90,8 @@ void test_searchByValue_existing(){ Node* result = searchByValue(&stack, 5); assert(result != NULL && result->data == 5); + destroyStack(&stack); + printf("test_searchByValue_existing() passed\n"); } @@ -101,6 +109,8 @@ void test_searchByValue_nonexisting(){ Node* result = searchByValue(&stack, 10); assert(result == NULL); + destroyStack(&stack); + printf("test_searchByValue_nonexisting() passed\n"); } @@ -112,6 +122,8 @@ void test_searchByValue_empty(){ Node* result = searchByValue(&stack, 10); assert(result == NULL); + destroyStack(&stack); + printf("test_searchByValue_empty() passed\n"); } @@ -130,6 +142,8 @@ void test_searchByIndex_existing(){ Node* result = searchByIndex(&stack, 2); assert(result != NULL && result->data == 3); + destroyStack(&stack); + printf("test_searchByIndex_existing() passed\n"); } @@ -147,6 +161,8 @@ void test_searchByIndex_nonexisting(){ Node* result = searchByIndex(&stack, 10); assert(result == NULL); + destroyStack(&stack); + printf("test_searchByIndex_nonexisting() passed\n"); } @@ -158,6 +174,8 @@ void test_searchByIndex_empty(){ Node* result = searchByIndex(&stack, 10); assert(result == NULL); + destroyStack(&stack); + printf("test_earchByIndex_empty() passed\n"); } @@ -176,6 +194,8 @@ void test_getTop(){ Node* result = getTop(&stack); assert(result != NULL && result->data == 5); + destroyStack(&stack); + printf("test_getTop() passed\n"); } @@ -187,6 +207,8 @@ void test_getTop_empty(){ Node* result = getTop(&stack); assert(result == NULL); + destroyStack(&stack); + printf("test_getTop_empty() passed\n"); } @@ -206,6 +228,8 @@ void test_traverseStack(){ printf("Function output:"); traverseStack(&stack); + destroyStack(&stack); + printf("test_traverseStack() passed\n"); } @@ -218,6 +242,8 @@ void test_traverseStack_empty(){ printf("Function output:"); traverseStack(&stack); + destroyStack(&stack); + printf("test_traverseStack_empty() passed\n"); } @@ -235,6 +261,8 @@ void test_isEmpty(){ assert(isEmpty(&stack) == false); + destroyStack(&stack); + printf("test_isEmpty() passed\n"); } @@ -244,6 +272,8 @@ void test_isEmpty_empty(){ assert(isEmpty(&stack) == true); + destroyStack(&stack); + printf("test_isEmpty_empty() passed\n"); } From 832fd1debd39fabcbe135c41bba8a6f11e9be59c Mon Sep 17 00:00:00 2001 From: Rayquaza1 <50589232+Rayquaza1@users.noreply.github.com> Date: Thu, 20 Nov 2025 13:32:30 +0300 Subject: [PATCH 06/11] Create c-cpp.yml --- .github/workflows/c-cpp.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 0000000..6a9c312 --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,23 @@ +name: C/C++ CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: configure + run: ./configure + - name: make + run: make + - name: make check + run: make check + - name: make distcheck + run: make distcheck From 77fb178d964debb048beed4aa2b93b97d68b7323 Mon Sep 17 00:00:00 2001 From: Rayquaza1 <50589232+Rayquaza1@users.noreply.github.com> Date: Thu, 20 Nov 2025 13:40:39 +0300 Subject: [PATCH 07/11] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 6a9c312..1efa1c5 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -12,12 +12,21 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: configure - run: ./configure - - name: make - run: make - - name: make check - run: make check - - name: make distcheck - run: make distcheck + - name: checkout + uses: actions/checkout@v4 + + + - name: get gcc + run: | + sudo apt-get update + sudo apt-get install -y build-essential gcc + + - name: tests + run: | + gcc -fsanitize=address tests.c -o tests.exe + ./tests + + + + + From 60cab085dacc8a74018867785f3dc1ac71ea317e Mon Sep 17 00:00:00 2001 From: Rayquaza1 <50589232+Rayquaza1@users.noreply.github.com> Date: Thu, 20 Nov 2025 13:45:32 +0300 Subject: [PATCH 08/11] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 1efa1c5..ac3c8b5 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -23,7 +23,7 @@ jobs: - name: tests run: | - gcc -fsanitize=address tests.c -o tests.exe + gcc -fsanitize=address 05_hw/tests.c -o 05_hw/tests.exe ./tests From 2a65a1df2b85e90794d083afe1da6898ddbf0add Mon Sep 17 00:00:00 2001 From: Rayquaza1 <50589232+Rayquaza1@users.noreply.github.com> Date: Thu, 20 Nov 2025 13:46:53 +0300 Subject: [PATCH 09/11] fixed stack.c --- 05_hw/stack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/05_hw/stack.c b/05_hw/stack.c index 97725da..32546f9 100644 --- a/05_hw/stack.c +++ b/05_hw/stack.c @@ -68,7 +68,7 @@ Node* searchByIndex(Stack* stack, int index) { return NULL; } -Node* getTop(const Stack* stack) { +Node* getTop(Stack* const stack) { return stack->top; } @@ -82,7 +82,7 @@ void traverseStack(Stack* stack) { printf("\n"); } -bool isEmpty(const Stack* stack) { +bool isEmpty(Stack* const stack) { return stack->top == NULL; } From e2f9883b3b1231522c5134c632dc5076803ec661 Mon Sep 17 00:00:00 2001 From: Rayquaza1 <50589232+Rayquaza1@users.noreply.github.com> Date: Thu, 20 Nov 2025 13:48:10 +0300 Subject: [PATCH 10/11] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index ac3c8b5..c27a161 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -24,7 +24,7 @@ jobs: - name: tests run: | gcc -fsanitize=address 05_hw/tests.c -o 05_hw/tests.exe - ./tests + ./05_hw/tests From ed434d6c9209647b8509dd515e3399dab5bfd277 Mon Sep 17 00:00:00 2001 From: Rayquaza1 <50589232+Rayquaza1@users.noreply.github.com> Date: Thu, 20 Nov 2025 13:50:34 +0300 Subject: [PATCH 11/11] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index c27a161..fc221e9 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -23,8 +23,8 @@ jobs: - name: tests run: | - gcc -fsanitize=address 05_hw/tests.c -o 05_hw/tests.exe - ./05_hw/tests + gcc -fsanitize=address 05_hw/tests.c -o tests.exe + ./tests.exe