lundi 4 juillet 2016

CUnit assertion Assertion `((void *)0) != f_pCurSuite' failed

My code looks like this:

#include <CUnit/CUnit.h>


int maxi(int i1, int i2)
{
    return (i1 > i2) ? i1 : i2;
}

void test_maxi(void)
{
    CU_ASSERT(maxi(0,2) == 2);
}

int main() {
    test_maxi();
    return 0;
}

I compiled it using gcc test.c -o test -lcunit on Ubuntu.

I get this error when trying to launch it:

test: TestRun.c:159: CU_assertImplementation: Assertion `((void *)0) != f_pCurSuite' failed. Aborted (core dumped)

What does it mean? I found nothing about it on the internet.

Aucun commentaire:

Enregistrer un commentaire