![]() |
P4C
The P4 Compiler
|
Encapsulates functionality for running the front- and mid-ends of the compiler in a test. More...
#include <gtest_utils.h>
Public Member Functions | |
P4ToolsTestCase (const P4Tools::CompilerResult &compilerResults) | |
const P4Tools::CompilerResult & | getCompilerResult () const |
const IR::P4Program & | getProgram () const |
Static Public Member Functions | |
static std::optional< const P4ToolsTestCase > | create (std::string deviceName, std::string archName, CompilerOptions::FrontendVersion langVersion, const std::string &source) |
Factory method for producing a test case from a P4 program source. | |
static std::optional< const P4ToolsTestCase > | create_14 (std::string deviceName, std::string archName, const std::string &source) |
Factory method for producing a test case from a P4_14 program source. | |
static std::optional< const P4ToolsTestCase > | create_16 (std::string deviceName, std::string archName, const std::string &source) |
Factory method for producing a test case from a P4_16 program source. | |
Encapsulates functionality for running the front- and mid-ends of the compiler in a test.
|
nodiscard |
|
nodiscard |