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

Library-function test-driver #56

Open
Artoria2e5 opened this issue Oct 12, 2023 · 1 comment
Open

Library-function test-driver #56

Artoria2e5 opened this issue Oct 12, 2023 · 1 comment

Comments

@Artoria2e5
Copy link

Artoria2e5 commented Oct 12, 2023

The current test driver is based on string (usually stdout and argv) I/O and is not quite convenient to call from more restrictive environments such as iOS. A graphics environment might also want to display the results without too much string manipulation. A more "struct-ured" (pardon my pun) API taking a struct input (multithread, seed) and a struct output (anything printed) might be more adequate and portable. core_results is 90% there already.

@Artoria2e5
Copy link
Author

The less intrusive way is to redirect main and ee_printf. Basically the caller calls the renamed core_main supplying argc and argv, then retrieve the result from a global buffer that the new printf writes to.

This can be achieved without modifying the 5 core files -- ifdef is enough to rename main(). The makefile still needs to be taken down and rewritten.

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

No branches or pull requests

1 participant