Ejemplo n.º 1
0
    /// Clear FAILURE and ERROR markers.
    void addFailure( const CppUnit::TestFailure &failure )
    {
#if RUNMPI == true
        CppUnit::stdCOut() << std::endl << "!!! "
                           << failure.failedTest()->getName()
                           << ( failure.isError() ? "- ERROR" : "- FAIL" )
                           << " on MPI rank " << MPICommons::myRank()
                           << std::endl;
        CppUnit::stdCOut().flush();
#else
        const int padding_length = 60 - failure.failedTest()->getName().length();
        const std::string padding(padding_length, '-');
        CppUnit::stdCOut() << "   <" << padding << ( failure.isError() ? "- ERROR" : "- FAIL" );
        CppUnit::stdCOut().flush();
#endif
    }
Ejemplo n.º 2
0
 virtual void addFailure(const CppUnit::TestFailure& failure)
 {
   cout << endl << "Failure: " << failure.failedTest()->getName() << endl
     << "  " << failure.sourceLine().fileName() << "(" << failure.sourceLine().lineNumber() << ") ";
   CppUnit::Exception* e = failure.thrownException();
   if (e != NULL && QString::fromStdString(e->message().details()).trimmed() != "")
   {
     cout << "  " << e->message().details();
   }
   cout.flush();
   _success = false;
 }