Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Pequeñas correcciones de tests #49
Browse files Browse the repository at this point in the history
  • Loading branch information
Olasergiolas committed Dec 13, 2021
1 parent 7fee84d commit df1087b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions pkg/autoeq/autoeq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ func TestOpenParametricData(t *testing.T) {
t.Log("Parametric EQ config reading test")

fixture := "../../docs/examples/AutoEQ_parametric.txt"
returnedLines := OpenParametricData(fixture)
returnedLines, err := OpenParametricData(fixture)
assert.EqualValues(Success, err, "Error while opening parametric data")

returnedLinesType := reflect.TypeOf(returnedLines).String()
wantedLen := 11

assert.Equal(len(returnedLines), wantedLen, "Wrong number of bands read")
assert.Equal(returnedLinesType, "[]string", "Expected []string but found "+returnedLinesType)
assert.Equal(wantedLen, len(returnedLines), "Wrong number of bands read")
assert.Equal("[]string", returnedLinesType, "Expected []string but found "+returnedLinesType)
}

func TestCreateBandMap(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/autoeq/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func NewOutput(eq equalizer) outputWrapper {
func AutoeqToEasyEffects(configPath string) outputWrapper {
lines, err := OpenParametricData(configPath)

if err != 0 {
if err != Success {
NewLogger().Log(uint(err))
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/autoeq/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func OpenParametricData(path string) ([]string, ErrorType) {
for sc.Scan() {
lines = append(lines, sc.Text())
}
return lines, 0
return lines, Success
}

func GetPreamp(configHeadline string) float32 {
Expand Down

0 comments on commit df1087b

Please sign in to comment.