blitzdg
an open-source project aiming to implement parallel discontinuous Galerkin (dg) solvers for common partial differential equations systems using blitz++ for array and tensor manipulations and MPI for distributed parallelism.
testresultfactory.h
1 
2 // Copyright Joakim Karlsson & Kim Gräsman 2010-2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 
7 #ifndef TESTRESULTFACTORY_H
8 #define TESTRESULTFACTORY_H
9 
10 namespace igloo {
11 
13  {
14  public:
15  TestResultFactory(const std::string& contextName, const std::string& specName)
16  : m_contextName(contextName), m_specName(specName)
17  {}
18 
19  FailedTestResult CreateFromException(const snowhouse::AssertionException& exception) const
20  {
21  return FailedTestResult(m_contextName, m_specName, exception.GetMessage(), exception.GetFilename(), exception.GetLineNumber());
22  }
23 
24  SucceededTestResult CreateSuccessful() const
25  {
26  return SucceededTestResult(m_contextName, m_specName);
27  }
28 
29  private:
30  std::string m_contextName;
31  std::string m_specName;
32  };
33 }
34 #endif
Definition: testresult.h:52
Definition: assertionexception.h:11
Definition: context.h:13
Definition: testresult.h:12
Definition: testresultfactory.h:12