Commit 2f0c9cc9 authored by Imdad Sardharwalla's avatar Imdad Sardharwalla Committed by GitHub Enterprise
Browse files

REFORM-1000 Import Execution checksum class from ReForm (#22)

* Remove pImpl pattern from Execution class, as it adds unnecessary
  complexity

* Remove timing from Execution class, as it was only really relevant
  to the part of Execution that was moved to the Completion class a
  few commits ago

* Remove unnecessary headers
parent ea4d0bd1
......@@ -5,6 +5,7 @@ set(my_headers
${CMAKE_CURRENT_SOURCE_DIR}/TestChecksumCompletion.hh
${CMAKE_CURRENT_SOURCE_DIR}/TestChecksumCondition.hh
${CMAKE_CURRENT_SOURCE_DIR}/TestChecksumDebugEvent.hh
${CMAKE_CURRENT_SOURCE_DIR}/TestChecksumExecution.hh
${CMAKE_CURRENT_SOURCE_DIR}/TestChecksumFile.hh
${CMAKE_CURRENT_SOURCE_DIR}/TestChecksumIssueNumber.hh
${CMAKE_CURRENT_SOURCE_DIR}/TestChecksumLevel.hh
......@@ -23,6 +24,7 @@ set(my_sources
${CMAKE_CURRENT_SOURCE_DIR}/TestChecksumCompletion.cc
${CMAKE_CURRENT_SOURCE_DIR}/TestChecksumCondition.cc
${CMAKE_CURRENT_SOURCE_DIR}/TestChecksumDebugEvent.cc
${CMAKE_CURRENT_SOURCE_DIR}/TestChecksumExecution.cc
${CMAKE_CURRENT_SOURCE_DIR}/TestChecksumFile.cc
${CMAKE_CURRENT_SOURCE_DIR}/TestChecksumIssueNumber.cc
${CMAKE_CURRENT_SOURCE_DIR}/TestPaths.cc
......
// (C) Copyright 2021 by Autodesk, Inc.
#ifdef TEST_ON
#include "TestChecksumExecution.hh"
#include <string>
namespace Test
{
namespace Checksum
{
Execution::Execution() : Object("Execution", L_STABLE) {}
void Execution::record(
const char* const _call, const Result& _rslt, const char* _err_msg)
{
std::stringstream mess;
mess << _err_msg << " : " << _call;
add(_rslt, mess.str());
}
// Register the checksum to check test execution.
Execution exec;
} // namespace Checksum
} // namespace Test
#endif // TEST_ON
// (C) Copyright 2021 by Autodesk, Inc.
#ifndef BASE_CHECKSUMEXEC_HH_INCLUDE
#define BASE_CHECKSUMEXEC_HH_INCLUDE
#ifdef TEST_ON
#include <Base/Test/TestChecksum.hh>
namespace Test
{
namespace Checksum
{
// Logs the returned result of a (function) call along with any associated error
// message.
class Execution : public Object
{
public:
Execution();
void record(
const char* const _call, const Result& _rslt, const char* _err_msg);
};
// Register the checksum to check test execution.
extern Execution exec;
} // namespace Checksum
} // namespace Test
#endif // TEST_ON
#endif // BASE_CHECKSUMEXEC_HH_INCLUDE
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment