test/crashdump_test.cc
changeset 452 7600b9f9ee9c
child 455 154302d31d05
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/crashdump_test.cc	Sun Feb 21 12:00:51 2016 +0100
     1.3 @@ -0,0 +1,30 @@
     1.4 +#include <iostream>
     1.5 +#include <string>
     1.6 +#include <assert.h>
     1.7 +#include "pEpEngine.h"
     1.8 +
     1.9 +using namespace std;
    1.10 +
    1.11 +int main() {
    1.12 +    cout << "\n*** MODULE_test ***\n\n";
    1.13 +
    1.14 +    PEP_SESSION session;
    1.15 +    
    1.16 +    cout << "calling init()\n";
    1.17 +    PEP_STATUS status1 = init(&session);   
    1.18 +    assert(status1 == PEP_STATUS_OK);
    1.19 +    assert(session);
    1.20 +    cout << "init() completed.\n";
    1.21 +
    1.22 +    // MODULE test code
    1.23 +
    1.24 +    char *text;
    1.25 +    PEP_STATUS status2 = get_crashdump_log(session, 10, &text);
    1.26 +    assert(status2 == PEP_STATUS_OK);
    1.27 +    cout << text;
    1.28 +
    1.29 +    cout << "calling release()\n";
    1.30 +    release(session);
    1.31 +    return 0;
    1.32 +}
    1.33 +