summaryrefslogtreecommitdiffhomepage
path: root/tests/test-flowgraph.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-11-14 22:06:10 +0100
committerRoland Reichwein <mail@reichwein.it>2020-11-14 22:06:10 +0100
commit9e7f4c9d43b310c280cd6432cd4150411f4b914e (patch)
treec7be57a91602c228f05ff1cab2f186dcc6635733 /tests/test-flowgraph.cpp
parent009e450626194299ee4b5ccb8463ac64e127fde6 (diff)
Added system tests
Diffstat (limited to 'tests/test-flowgraph.cpp')
-rw-r--r--tests/test-flowgraph.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/test-flowgraph.cpp b/tests/test-flowgraph.cpp
index f0cc204..021d6dd 100644
--- a/tests/test-flowgraph.cpp
+++ b/tests/test-flowgraph.cpp
@@ -40,12 +40,18 @@ protected:
TEST_F(FlowGraphTest, build_graph) {
Graph graph;
- Data pointer{ MakeLocalPointer("malloc1") };
- Data size{ MakeLocalSize("size1") };
- std::shared_ptr<Node> malloc1 {std::make_shared<AllocateDynamic>(pointer, size) };
- std::shared_ptr<Node> free1{ std::make_shared<DeallocateDynamic>(pointer) };
+ std::shared_ptr<CreateScopeOp> createScope{std::make_shared<CreateScopeOp>()};
+ graph.push_back(createScope);
+ Data pointer{ MakeLocalPointer(createScope->scope(), "malloc1") };
+ Data size{ MakeLocalSize(createScope->scope(), "size1") };
+ std::shared_ptr<Node> malloc1 {std::make_shared<AllocateDynamic>(pointer, size) };
graph.push_back(malloc1);
+
+ std::shared_ptr<Node> free1{ std::make_shared<DeallocateDynamic>(pointer) };
graph.push_back(free1);
+
+ std::shared_ptr<Node> destroyScope{std::make_shared<DestroyScopeOp>()};
+ graph.push_back(destroyScope);
}