test/crashdump_test.cc
author Edouard Tisserant <edouard@pep-project.org>
Mon, 24 Oct 2016 21:46:30 +0200
branchkeysync
changeset 1336 f1ee8497bbfd
parent 455 154302d31d05
child 1513 e7f7e42385b5
permissions -rw-r--r--
closed branch
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@455
     9
    cout << "\n*** crashdump_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@455
    22
    PEP_STATUS status2 = get_crashdump_log(session, 0, &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