mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 18:15:42 +01:00
Add minimum documentation to some functions
This commit is contained in:
parent
b14d775422
commit
b06c316ee0
1 changed files with 3 additions and 1 deletions
|
|
@ -63,9 +63,10 @@ func TestParse(t *testing.T) {
|
||||||
if _, _, err := p.Parse(); err == nil {
|
if _, _, err := p.Parse(); err == nil {
|
||||||
t.Errorf("Failure: Invalid path expanded.")
|
t.Errorf("Failure: Invalid path expanded.")
|
||||||
}
|
}
|
||||||
// fmt.Println(p.Parse())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestFindConfigFile tests if findConfigFile() correctly finds existing and
|
||||||
|
// doesn't find nonexisting config files
|
||||||
func TestFindConfigFile(t *testing.T) {
|
func TestFindConfigFile(t *testing.T) {
|
||||||
locations := []string{"data/config.toml"}
|
locations := []string{"data/config.toml"}
|
||||||
notLocation := []string{"notomllocation"}
|
notLocation := []string{"notomllocation"}
|
||||||
|
|
@ -83,6 +84,7 @@ func TestFindConfigFile(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestLoadToml tests if loadTOML() can correctly load TOML files
|
||||||
func TestLoadToml(t *testing.T) {
|
func TestLoadToml(t *testing.T) {
|
||||||
var cfg config
|
var cfg config
|
||||||
if err := loadTOML(&cfg, "data/nonexistant.toml"); err.Error() != "open "+
|
if err := loadTOML(&cfg, "data/nonexistant.toml"); err.Error() != "open "+
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue