From 56c9e73150e57cc7732b1d95fb740dbd5ce371e4 Mon Sep 17 00:00:00 2001 From: fruffy Date: Mon, 13 Mar 2023 11:38:03 -0400 Subject: [PATCH] Add optional matches for now. --- .../targets/bmv2/backend/protobuf/protobuf.cpp | 16 ++++++---------- .../testgen/targets/bmv2/backend/ptf/ptf.cpp | 1 + .../testgen/targets/bmv2/backend/stf/stf.cpp | 12 ++---------- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/backends/p4tools/modules/testgen/targets/bmv2/backend/protobuf/protobuf.cpp b/backends/p4tools/modules/testgen/targets/bmv2/backend/protobuf/protobuf.cpp index c789eff09f..3dda5c66dd 100644 --- a/backends/p4tools/modules/testgen/targets/bmv2/backend/protobuf/protobuf.cpp +++ b/backends/p4tools/modules/testgen/targets/bmv2/backend/protobuf/protobuf.cpp @@ -34,11 +34,7 @@ #include "backends/p4tools/modules/testgen/lib/tf.h" #include "backends/p4tools/modules/testgen/targets/bmv2/test_spec.h" -namespace P4Tools { - -namespace P4Testgen { - -namespace Bmv2 { +namespace P4Tools::P4Testgen::Bmv2 { /// Wrapper helper function that automatically inserts separators for hex strings. std::string formatHexExprWithSep(const IR::Expression *expr) { @@ -178,6 +174,7 @@ inja::json Protobuf::getControlPlaneForTable(const std::map seed = boost::none) : TF(testName, seed) { boost::filesystem::path testFile(testName + ".stf"); @@ -339,8 +335,4 @@ void STF::outputTest(const TestSpec *testSpec, cstring selectedBranches, size_t emitTestcase(testSpec, selectedBranches, testIdx, testCase, currentCoverage); } -} // namespace Bmv2 - -} // namespace P4Testgen - -} // namespace P4Tools +} // namespace P4Tools::P4Testgen::Bmv2