summaryrefslogtreecommitdiffhomepage
path: root/tests/test-flowgraph.cpp
blob: 132af4b1899c09f601ef036c7c078a2002a58edd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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);
}