test/crashdump_test.cc
author Volker Birk <vb@pep.foundation>
Tue, 27 Dec 2016 21:13:41 +0100
changeset 1513 e7f7e42385b5
parent 455 154302d31d05
permissions -rw-r--r--
adding license info to each file
     1 // This file is under GNU General Public License 3.0
     2 // see LICENSE.txt
     3 
     4 #include <iostream>
     5 #include <string>
     6 #include <assert.h>
     7 #include "pEpEngine.h"
     8 
     9 using namespace std;
    10 
    11 int main() {
    12     cout << "\n*** crashdump_test ***\n\n";
    13 
    14     PEP_SESSION session;
    15     
    16     cout << "calling init()\n";
    17     PEP_STATUS status1 = init(&session);   
    18     assert(status1 == PEP_STATUS_OK);
    19     assert(session);
    20     cout << "init() completed.\n";
    21 
    22     // MODULE test code
    23 
    24     char *text;
    25     PEP_STATUS status2 = get_crashdump_log(session, 0, &text);
    26     assert(status2 == PEP_STATUS_OK);
    27     cout << text;
    28 
    29     cout << "calling release()\n";
    30     release(session);
    31     return 0;
    32 }
    33