Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TEST] Add unit tests for libc #1974

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

Conversation

BWindey
Copy link
Contributor

@BWindey BWindey commented Feb 15, 2025

This PR aims to add unit tests for libc.

Along the way, I also discovered some issues with the bindings currently present. Some pointers being misaligned (void * instead of void*), but also a wrong return type for libc::bsearch().

This is a draft PR, because I'm far from done, but would like some input on how thorough these tests should be. I feel like they shouldn't be that thorough, because they should be battle-tested C-code, we're just testing that we can call them from C3, and potentially providing an example for people.

@lerno
Copy link
Collaborator

lerno commented Feb 19, 2025

Is this still a draft?

@BWindey
Copy link
Contributor Author

BWindey commented Feb 19, 2025

Yes, I'm not ready yet with most functions.
I don't think I can write tests for every binding in libc, but I can at least check if they are right (correct types), and for the simple ones write a simple test to see if all works as expected.

I'm a bit busy at the moment, but would like to get this out of draft status within at most 2 weeks, preferably 1 week.

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.

2 participants