From 9e7f4c9d43b310c280cd6432cd4150411f4b914e Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 14 Nov 2020 22:06:10 +0100 Subject: Added system tests --- tests/test-flowgraph.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'tests/test-flowgraph.cpp') 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 malloc1 {std::make_shared(pointer, size) }; - std::shared_ptr free1{ std::make_shared(pointer) }; + std::shared_ptr createScope{std::make_shared()}; + graph.push_back(createScope); + Data pointer{ MakeLocalPointer(createScope->scope(), "malloc1") }; + Data size{ MakeLocalSize(createScope->scope(), "size1") }; + std::shared_ptr malloc1 {std::make_shared(pointer, size) }; graph.push_back(malloc1); + + std::shared_ptr free1{ std::make_shared(pointer) }; graph.push_back(free1); + + std::shared_ptr destroyScope{std::make_shared()}; + graph.push_back(destroyScope); } -- cgit v1.2.3