diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-10-24 16:32:18 +0200 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-10-24 16:32:18 +0200 |
commit | 1011655d2ef76a0c0aa29dbbff091dab139198e3 (patch) | |
tree | 63763828f259846f56285691805c187583ecb6bb /tests/test-flowgraph.cpp | |
parent | 1349c00b782eca3ea841bfa388301cb6fc908cc7 (diff) |
Add FlowGraph
Diffstat (limited to 'tests/test-flowgraph.cpp')
-rw-r--r-- | tests/test-flowgraph.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/test-flowgraph.cpp b/tests/test-flowgraph.cpp new file mode 100644 index 0000000..132af4b --- /dev/null +++ b/tests/test-flowgraph.cpp @@ -0,0 +1,50 @@ +#include "flowgraph/data.h" +#include "flowgraph/graph.h" +#include "flowgraph/node.h" +#include "flowgraph/storage.h" + +#include <boost/algorithm/string.hpp> + +#include "gmock/gmock.h" +#include "gtest/gtest.h" + +#include <algorithm> +#include <cctype> +#include <deque> +#include <map> +#include <memory> +#include <string> +#include <system_error> +#include <utility> +#include <vector> + +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; + + 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) }; + + graph.push_back(malloc1); + graph.push_back(free1); +} |