test/crashdump_test.cc
author Volker Birk <vb@pep-project.org>
Sun, 21 Feb 2016 12:00:51 +0100
changeset 452 7600b9f9ee9c
child 455 154302d31d05
permissions -rw-r--r--
adding timestamp to crashdump
vb@452
     1
#include <iostream>
vb@452
     2
#include <string>
vb@452
     3
#include <assert.h>
vb@452
     4
#include "pEpEngine.h"
vb@452
     5
vb@452
     6
using namespace std;
vb@452
     7
vb@452
     8
int main() {
vb@452
     9
    cout << "\n*** MODULE_test ***\n\n";
vb@452
    10
vb@452
    11
    PEP_SESSION session;
vb@452
    12
    
vb@452
    13
    cout << "calling init()\n";
vb@452
    14
    PEP_STATUS status1 = init(&session);   
vb@452
    15
    assert(status1 == PEP_STATUS_OK);
vb@452
    16
    assert(session);
vb@452
    17
    cout << "init() completed.\n";
vb@452
    18
vb@452
    19
    // MODULE test code
vb@452
    20
vb@452
    21
    char *text;
vb@452
    22
    PEP_STATUS status2 = get_crashdump_log(session, 10, &text);
vb@452
    23
    assert(status2 == PEP_STATUS_OK);
vb@452
    24
    cout << text;
vb@452
    25
vb@452
    26
    cout << "calling release()\n";
vb@452
    27
    release(session);
vb@452
    28
    return 0;
vb@452
    29
}
vb@452
    30