P4C
The P4 Compiler
|
Protected Types | |
using | EventLogger = EventLoggerTestable |
Protected Member Functions | |
void | compareFileWithExpected (std::ifstream &file, const std::vector< std::string > &expectedLines) |
void | deinitLogger () |
void | initLogger (bool enable=true) |
void | SetUp () |
void | TearDown () |
Protected Attributes | |
const std::string | DEFAULT_PROPERTIES |
const std::string | DEFAULT_PROPERTIES_DISABLED |
const std::string | EVENT_IDS |
const std::string | FILE = "event-log-gtest.json" |
std::istringstream | inputCode = std::istringstream("header hdr { bit<8> field; }") |
const std::string | OUTDIR = "/tmp" |
const std::string | PATH = OUTDIR + "/" + FILE |
const IR::P4Program * | program = P4::P4ParserDriver::parse(inputCode, "file.cpp", 1) |
const std::string | PROPERTIES_WITH_FILE |
const std::string | PROPERTIES_WITH_MGRS |
const std::string | SCHEMA_VERSION = R"("schema_version":"1.2.0")" |
const Util::SourceInfo | srcInfo = program->objects[0]->srcInfo |
|
inlineprotected |
If you execute WHOLE testing suite then EventLogger instance already exists and nullInit has been called. But EventLoggerTestable does not exist and get2() will result in re-executing nullInit (which is an error). Because of that, setup deinits EventLogger using get(), then uses get2() to instantiate EventLoggerTestable and setup logger.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |