![]() |
P4C
The P4 Compiler
|
Public Member Functions | |
| TestSpec (Packet ingressPacket, std::optional< Packet > egressPacket, std::vector< std::reference_wrapper< const TraceEvent > > traces) | |
| void | addTestObject (cstring category, cstring objectLabel, const TestObject *object) |
| std::optional< const Packet * > | getEgressPacket () const |
| const Packet * | getIngressPacket () const |
| const std::map< cstring, const TableConfig > * | getTables () const |
| const TestObject * | getTestObject (cstring category, cstring objectLabel, bool checked) const |
| template<class T > | |
| auto * | getTestObject (cstring category, cstring objectLabel, bool checked) const |
| TestObjectMap | getTestObjectCategory (cstring category) const |
| const std::vector< std::reference_wrapper< const TraceEvent > > * | getTraces () const |
Static Public Attributes | |
| static constexpr int | HIGH_PRIORITY = 100 |
| static constexpr int | LOW_PRIORITY = 1 |
| static constexpr int | NO_PRIORITY = -1 |
| Priority definitions for LPM and ternary entries. | |
| static constexpr int | TTL = 0 |
| void P4Tools::P4Testgen::TestSpec::addTestObject | ( | cstring | category, |
| cstring | objectLabel, | ||
| const TestObject * | object ) |
Add a test object to the test specification with
| category | as the object category (for example, "tables", "registers", "action_profiles") and objectLabel as the concrete, individual label of the object. |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
inlinenodiscard |
| checked | is enabled, a BUG is thrown if the object label does not exist. Also casts the test object to the specified type. If the type does not match, a BUG is thrown. |
|
nodiscard |
|
nodiscard |