All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
kaldi-error-test.cc File Reference
Include dependency graph for kaldi-error-test.cc:

Go to the source code of this file.

Namespaces

 kaldi
 Relabels neural network egs with the read pdf-id alignments.
 

Functions

void MyFunction2 ()
 
void MyFunction1 ()
 
void UnitTestError ()
 
int main ()
 

Function Documentation

int main ( )

Definition at line 44 of file kaldi-error-test.cc.

References kaldi::g_program_name, KALDI_ASSERT, and kaldi::UnitTestError().

44  {
45  kaldi::g_program_name = "/foo/bar/kaldi-error-test";
46  try {
48  KALDI_ASSERT(0); // should not happen.
49  exit(1);
50  } catch(std::runtime_error &r) {
51  std::cout << "UnitTestError: the error we generated was: " << r.what();
52  }
53 }
const char * g_program_name
This is set by util/parse-options.
Definition: kaldi-error.cc:41
void UnitTestError()
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:169