#include <lestes/common.hh>#include <lestes/std/backtrace.hh>#include <fstream>Go to the source code of this file.
Functions | |
| void | foo (int i) |
| int | main () |
Variables | |
| ::std::ofstream * | ofs = NULL |
| void foo | ( | int | i | ) |
Definition at line 37 of file backtrace.test.cc.
References lestes::std::assemble_backtrace(), lassert2, and ofs.
Referenced by main().
00037 { 00038 if (i == 50) { 00039 lassert2(ofs, "The file stream shall exist."); 00040 *ofs << assemble_backtrace() << ::std::endl; 00041 } 00042 if (i > 600) { 00043 lassert2(ofs, "The file stream shall exist."); 00044 *ofs << assemble_backtrace() << ::std::endl; 00045 } else { 00046 foo(i+1); 00047 } 00048 }
| int main | ( | void | ) |
Definition at line 49 of file backtrace.test.cc.
References lestes::std::assemble_backtrace(), foo(), lassert2, and ofs.
00050 { 00051 ::std::ofstream f("backtrace.test.txt"); 00052 ::ofs = &f; 00053 f << "Backtrace test\n" << ::std::endl; 00054 lassert2(ofs, "The file stream shall exist."); 00055 f << assemble_backtrace() << ::std::endl; 00056 foo(0); 00057 ::ofs = NULL; 00058 f << "Backtrace test end." << ::std::endl; 00059 f.close(); 00060 }
| ::std::ofstream* ofs = NULL |
1.5.1-20070107