| 1 |
// Copyright(C) 1999-2021 National Technology & Engineering Solutions |
| 2 |
// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 3 |
// NTESS, the U.S. Government retains certain rights in this software. |
| 4 |
// |
| 5 |
// See packages/seacas/LICENSE for details |
| 6 |
|
| 7 |
#include "CatalystTestFixture.h" |
| 8 |
#include "Ioss_PropertyManager.h" |
| 9 |
#include "catch.hpp" |
| 10 |
#include <Iovs_CatalystLogging.h> |
| 11 |
|
| 12 |
TEST_CASE_METHOD(CatalystTestFixture, "CatalystLoggingDefault", "[catalyst logging]") |
| 13 |
{ |
| 14 |
std::string logFileName = "log.csv"; |
| 15 |
Ioss::PropertyManager props; |
| 16 |
props.add(Ioss::Property("CATALYST_LOGGING_ENABLED", true)); |
| 17 |
props.add(Ioss::Property("CATALYST_LOGGING_FILE_NAME", logFileName)); |
| 18 |
props.add(Ioss::Property("CATALYST_LOGGING_STRING_PROP", "Log Info")); |
| 19 |
props.add(Ioss::Property("CATALYST_LOGGING_INTEGER_PROP", -33)); |
| 20 |
runCatalystLoggingTest(&props, "test1.json", "block_crush_1.ex2"); |
| 21 |
checkTestOutputFileDoesNotExist(Iovs::CatalystLogging::getDefaultLogFileName().c_str()); |
| 22 |
checkTestOutputFileExists("CatalystOutput/test1.0010.png"); |
| 23 |
checkTestOutputFileExists(logFileName.c_str()); |
| 24 |
} |