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