forked from crackcell/hpipe
/
dag_test.go
49 lines (44 loc) · 972 Bytes
/
dag_test.go
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
/***************************************************************
*
* Copyright (c) 2015, Menglong TAN <tanmenglong@gmail.com>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GPL licence
*
**************************************************************/
/**
*
*
* @file dag_test.go
* @author Menglong TAN <tanmenglong@gmail.com>
* @date Wed Aug 19 00:45:32 2015
*
**/
package main
import (
//"fmt"
"github.com/crackcell/hpipe/dag"
"io/ioutil"
"testing"
)
func TestDAGFactoryCreateDAGFromFile(t *testing.T) {
_, err := dag.LoadFromFile("examples/wordcount/wordcount.dot")
if err != nil {
t.Error(err)
return
}
//fmt.Println(d)
}
func TestDAGFactoryCreateDAGFromBytes(t *testing.T) {
data, err := ioutil.ReadFile("examples/wordcount/wordcount.dot")
if err != nil {
t.Error(err)
return
}
_, err = dag.LoadFromBytes(data)
if err != nil {
t.Error(err)
return
}
//fmt.Println(d)
}