aboutsummaryrefslogtreecommitdiffstats
path: root/core_test.go
blob: 700052ffe7158b3502b3930b42146b9cd2667f34 (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
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())
	}
}