diff --git a/unit_tests/graph/Test_Matching.cpp b/unit_tests/graph/Test_Matching.cpp index 6c5abcc4725d7f27292970ab8b2746227775751b..d00b6653782ae126ba513b2106fbb0b2cf3aae26 100644 --- a/unit_tests/graph/Test_Matching.cpp +++ b/unit_tests/graph/Test_Matching.cpp @@ -205,4 +205,18 @@ TEST_CASE("[core/graph] Matching") { {"conv3_pad", {"conv3_conv", "conv3_pad", "relu3"}} }); } + + SECTION(".[test]->Pad") { + auto gm = GraphMatching(g1); + gm.addNodeLambda("test", [](const NodePtr& node) { + return (node->type() == "Add" || (node->type() == "ReLU" && node->name() == "relu1")); + }); + + const auto results = gm.match(".[test]->Pad"); + + checkMatches(results, { + {"add", {"add", "conv5_pad"}}, + {"relu1", {"relu1", "conv2_pad"}} + }); + } }