From cd1bee124901b745e28e099865716c115213f63e Mon Sep 17 00:00:00 2001
From: NAUD Maxence <maxence.naud@cea.fr>
Date: Wed, 4 Oct 2023 15:06:30 +0000
Subject: [PATCH] [Add] First draft of a test for horizontalTiling
 transformation

---
 unit_tests/recipies/Test_HorizontalTiling.cpp | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 unit_tests/recipies/Test_HorizontalTiling.cpp

diff --git a/unit_tests/recipies/Test_HorizontalTiling.cpp b/unit_tests/recipies/Test_HorizontalTiling.cpp
new file mode 100644
index 000000000..4fcd16414
--- /dev/null
+++ b/unit_tests/recipies/Test_HorizontalTiling.cpp
@@ -0,0 +1,47 @@
+/********************************************************************************
+ * Copyright (c) 2023 CEA-List
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ ********************************************************************************/
+
+#include <catch2/catch_test_macros.hpp>
+#include <set>
+
+#include "aidge/graph/GraphView.hpp"
+#include "aidge/graph/OpArgs.hpp"
+#include "aidge/operator/Conv.hpp"
+#include "aidge/operator/ReLU.hpp"
+#include "aidge/recipies/Recipies.hpp"
+
+
+namespace Aidge {
+
+TEST_CASE("[core/recipies] Tiling(horizontal)", "[Tiling][HorizontalTiling][Recipies]") {
+
+    SECTION("Transform a pre-generated GraphView") {
+        std::shared_ptr<GraphView> g = Sequential({
+            Conv(3, 16, {3,3}, "conv1"),
+            ReLU("relu1"),
+            Conv(16, 32, {1,1}, "conv2"),
+            Conv(32, 16, {1,1}, "conv3"),
+            Conv(16, 10, {3,3}, "conv4"),
+            ReLU("relu2")
+        });
+
+        for (auto& individualConv : g->match("Conv")) {
+            auto tiledConv = horizontalTiling(individualConv);
+            g->replace(individualConv, tiledConv);
+        }
+    }
+
+    SECTION("Create the GraphView with tiled layers") {
+        std::shared_ptr<GraphView> g;
+    }
+
+}
+} // namespace Aidge
\ No newline at end of file
-- 
GitLab