summaryrefslogtreecommitdiffhomepage
path: root/tests/test-flowgraph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-flowgraph.cpp')
-rw-r--r--tests/test-flowgraph.cpp50
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);
+}