Skip to content

Conversation

@NicMcPhee
Copy link
Contributor

This adds a set of tests using the GoogleTest library like we'll use in the other C labs, and expands the write-up some to talk about the testing framework a little.

This is a pre-req for adding GitHub Actions (#6).

Closes #5

This adds GTest tests for both the `strip()` and `check_whitespace()` functions.

I had to do some restructuring here, creating `check_whitespace.h` and moving `main()` out to `main.c`.

I also had a bunch of compiler warnings about type conversions; changing a bunch of things from `char*` to `char const *` made that better.

This is the important first step in adding GitHub Actions for this lab.
This adds GTest tests for both the `strip()` and `check_whitespace()` functions.

I had to do some restructuring here, creating `check_whitespace.h` and moving `main()` out to `main.c`.

I also had a bunch of compiler warnings about type conversions; changing a bunch of things from `char*` to `char const *` made that better.

This is the important first step in adding GitHub Actions for this lab.
This updates the README for the pre-lab so that we talk about the existence and use of the tests.
@dolan-peter dolan-peter merged commit 8d8be87 into main Sep 2, 2022
@NicMcPhee NicMcPhee deleted the add-gtest-tests branch September 2, 2022 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests for clean_whitespace.c

3 participants