mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-12 08:23:48 +02:00
Semantics
This commit is contained in:
parent
435083db9e
commit
4323148a85
@ -40,9 +40,8 @@ func Parse(data []byte) ([]Axis, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// if not a matrix build return an array with just the single axis.
|
|
||||||
if len(matrix) == 0 {
|
if len(matrix) == 0 {
|
||||||
return nil, nil
|
return []Axis{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return calc(matrix), nil
|
return calc(matrix), nil
|
||||||
|
@ -25,10 +25,10 @@ func TestMatrix(t *testing.T) {
|
|||||||
g.Assert(len(set)).Equal(24)
|
g.Assert(len(set)).Equal(24)
|
||||||
})
|
})
|
||||||
|
|
||||||
g.It("Should return nil if no matrix", func() {
|
g.It("Should return empty array if no matrix", func() {
|
||||||
axis, err := ParseString("")
|
axis, err := ParseString("")
|
||||||
g.Assert(err == nil).IsTrue()
|
g.Assert(err == nil).IsTrue()
|
||||||
g.Assert(axis == nil).IsTrue()
|
g.Assert(len(axis) == 0).IsTrue()
|
||||||
})
|
})
|
||||||
|
|
||||||
g.It("Should return included axis", func() {
|
g.It("Should return included axis", func() {
|
||||||
|
Loading…
Reference in New Issue
Block a user