From b1097ce8ed336278f29182b762c96136a78e158d Mon Sep 17 00:00:00 2001
From: cmoineau <cyril.moineau@cea.fr>
Date: Fri, 30 Aug 2024 12:54:52 +0000
Subject: [PATCH] Remove old GraphRegex to use new GraphMatching in unit test.

---
 unit_tests/graphRegex/Test_GraphRegex.cpp | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/unit_tests/graphRegex/Test_GraphRegex.cpp b/unit_tests/graphRegex/Test_GraphRegex.cpp
index e05e105d3..7e4027139 100644
--- a/unit_tests/graphRegex/Test_GraphRegex.cpp
+++ b/unit_tests/graphRegex/Test_GraphRegex.cpp
@@ -182,17 +182,8 @@ TEST_CASE("GraphRegexUser") {
         auto g = std::make_shared<GraphView>();
         g->add({w0, matmul0, b0, add0, w1, matmul1, b1, add1,fl,fc});
 
-        std::shared_ptr<GraphRegex> kitchenBook = std::make_shared<GraphRegex>();
-
-        kitchenBook->setNodeKey("Add","getType($) =='Add'");
-        kitchenBook->setNodeKey("MatMul","getType($) =='MatMul'");
-        kitchenBook->setNodeKey("Flatten","getType($) =='Flatten'");
-        kitchenBook->setNodeKey("FC","getType($) =='FC'");
-
-        //kitchenBook->addQuery("MatMul->Add",static_cast<void(*)(std::shared_ptr<MatchSolution>)>(fuseMulAdd));
-        kitchenBook->addQuery("Flatten->FC",static_cast<void(*)(std::shared_ptr<MatchSolution>)>(removeFlatten));
-
-        kitchenBook->appliedRecipes(g);
+        matMulToFC(g);
+        removeFlatten(g);
 
         std::set<std::shared_ptr<Node>> newNodes = g->getNodes();
         REQUIRE(newNodes != std::set<std::shared_ptr<Node>>({w0, matmul0, b0, add0, w1, matmul1, b1, add1,fc}));
-- 
GitLab