aboutsummaryrefslogtreecommitdiffstats
path: root/core_test.go
blob: d1905cbc0c90b849b0d2162f3da29be48fc29f2e (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
package main

import (
	"encoding/json"
	//"fmt"
	"os"
	"testing"
)

func TestNewBom(t *testing.T) {
	b, _ := makeTestBom()
	if b == nil {
		t.Errorf("Something went wrong")
	}
}

func TestBomJSONDump(t *testing.T) {

	b, _ := makeTestBom()
	enc := json.NewEncoder(os.Stdout)

	if err := enc.Encode(b); err != nil {
		t.Errorf("Error encoding: " + err.Error())
	}
}