From 646b1cb55756f6c987c63492f99806cd64f1232e Mon Sep 17 00:00:00 2001
From: gregoire kubler <gregoire.kubler@proton.me>
Date: Thu, 28 Mar 2024 11:14:30 +0100
Subject: [PATCH] chore : reordered tests

---
 src/recipes/RemoveFlatten.cpp             |  1 -
 unit_tests/recipes/Test_removeFlatten.cpp | 18 +++++++++++++-----
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/recipes/RemoveFlatten.cpp b/src/recipes/RemoveFlatten.cpp
index c28c4794e..8c1bf1bcf 100644
--- a/src/recipes/RemoveFlatten.cpp
+++ b/src/recipes/RemoveFlatten.cpp
@@ -22,7 +22,6 @@
 
 namespace Aidge {
     void removeFlatten(std::shared_ptr<Node> flatten) {
- 
         GraphView::replace({flatten}, {});
     }
 
diff --git a/unit_tests/recipes/Test_removeFlatten.cpp b/unit_tests/recipes/Test_removeFlatten.cpp
index 572fd121a..928adc82b 100644
--- a/unit_tests/recipes/Test_removeFlatten.cpp
+++ b/unit_tests/recipes/Test_removeFlatten.cpp
@@ -38,10 +38,12 @@ TEST_CASE("[cpu/recipies] RemoveFlatten", "[RemoveFlatten][recipies]") {
     removeFlatten(g);
     fmt::print("debug {}", __LINE__);
 
-    CHECK(g->getOrderedInputs().size() == 1);
     CHECK(g->getOrderedOutputs().size() == 1);
-    CHECK(g->getOrderedInputs()[0].first == fc0);
     CHECK(g->getOrderedOutputs()[0].first == flatten);
+
+    CHECK(g->getOrderedInputs().size() == 1);
+    CHECK(g->getOrderedInputs()[0].first == fc0);
+    
     CHECK(fc0->getParent(0) == nullptr);
     CHECK(fc0->getChildren(0).size() == 1);
     CHECK(g->getRootNode() == fc0);
@@ -54,9 +56,11 @@ TEST_CASE("[cpu/recipies] RemoveFlatten", "[RemoveFlatten][recipies]") {
     fmt::print("debug {}", __LINE__);
 
     CHECK(g->getOrderedInputs().size() == 1);
-    CHECK(g->getOrderedOutputs().size() == 1);
     CHECK(g->getOrderedInputs()[0].first == fc0);
+    
+    CHECK(g->getOrderedOutputs().size() == 1);
     CHECK(g->getOrderedOutputs()[0].first == fc0);
+    
     CHECK(fc0->getParent(0) == nullptr);
     CHECK(fc0->getChildren(0).size() == 0);
     CHECK(g->getRootNode() == fc0);
@@ -69,9 +73,11 @@ TEST_CASE("[cpu/recipies] RemoveFlatten", "[RemoveFlatten][recipies]") {
     fmt::print("debug {}", __LINE__);
 
     CHECK(g->getOrderedInputs().size() == 1);
-    CHECK(g->getOrderedOutputs().size() == 1);
     CHECK(g->getOrderedInputs()[0].first == fc0);
+
+    CHECK(g->getOrderedOutputs().size() == 1);
     CHECK(g->getOrderedOutputs()[0].first == fc1);
+    
     CHECK(fc1->getParent(0) == fc0);
     CHECK(fc0->getChildren(0)[0] == fc1);
     CHECK(g->getRootNode() == fc0);
@@ -87,11 +93,13 @@ TEST_CASE("[cpu/recipies] RemoveFlatten", "[RemoveFlatten][recipies]") {
 
     fmt::print("debug {}", __LINE__);
     CHECK(g->getOrderedInputs().size() == 0);
+    
     CHECK(g->getOrderedOutputs().size() == 1);
-    CHECK(g->getOrderedInputs()[0].first == fc0);
     CHECK(g->getOrderedOutputs()[0].first == fc0);
+    
     CHECK(fc0->getParent(0) == prod);
     CHECK(fc0->getChildren(0).size() == 0);
+
     CHECK(g->getRootNode() == prod);
   }
 }
-- 
GitLab