#include "flowgraph/data.h" #include "flowgraph/graph.h" #include "flowgraph/node.h" #include "flowgraph/storage.h" #include #include "gmock/gmock.h" #include "gtest/gtest.h" #include #include #include #include #include #include #include #include #include using namespace std::string_literals; namespace fs = std::filesystem; using namespace FlowGraph; class FlowGraphTest: public ::testing::Test { protected: FlowGraphTest() { //debug = true; } ~FlowGraphTest() { } void SetUp(){ } void TearDown(){ } }; TEST_F(FlowGraphTest, build_graph) { Graph graph; 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); }