1#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_TEST_GTEST_UTILS_H_
2#define BACKENDS_P4TOOLS_MODULES_TESTGEN_TEST_GTEST_UTILS_H_
4#include <gtest/gtest.h>
10#include "backends/p4tools/common/compiler/compiler_target.h"
11#include "frontends/common/options.h"
17class P4ToolsTestCase {
20 static std::optional<const P4ToolsTestCase>
create(std::string deviceName, std::string archName,
21 CompilerOptions::FrontendVersion langVersion,
22 const std::string &source);
25 static std::optional<const P4ToolsTestCase>
create_14(std::string deviceName,
27 const std::string &source);
30 static std::optional<const P4ToolsTestCase>
create_16(std::string deviceName,
32 const std::string &source);
37 [[nodiscard]]
const IR::P4Program &
getProgram()
const;
45 std::reference_wrapper<const P4Tools::CompilerResult> compilerResults;
48 static void ensureInit();
57 const IR::SymbolicVariable *preorder(IR::Member *member)
override;
Converts IR::Member into symbolic variables.
Definition gtest_utils.h:55