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

Assertions are not runned in the child processes created with cut_fork #22

Open
cristid9 opened this issue Sep 9, 2015 · 1 comment

Comments

@cristid9
Copy link

cristid9 commented Sep 9, 2015

For example, I would expect this code snippet to fail:

#include <cutter.h>

// This will pass.
void test_proveUnexpectedFailure()
{
    int pid = cut_fork();
    if (0 == pid) {
        cut_assert_equal_int(0, 1);  // If it passes, then something is wrong...
    }

    cut_assert_equal_int(0, 0); 
}

But it succeeds.

@kou
Copy link
Member

kou commented Sep 10, 2015

You can't use any assertions in child process.
Child process should output something to stdout and/or stderr and parent process asserts them.

See also:

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

2 participants