20 lines
334 B
Go
20 lines
334 B
Go
package api
|
|
|
|
import (
|
|
"reflect"
|
|
"testing"
|
|
)
|
|
|
|
func TestCompose_Constraints(t *testing.T) {
|
|
t.Parallel()
|
|
c := NewConstraint("kernel.name", "=", "darwin")
|
|
expect := &Constraint{
|
|
LTarget: "kernel.name",
|
|
RTarget: "darwin",
|
|
Operand: "=",
|
|
}
|
|
if !reflect.DeepEqual(c, expect) {
|
|
t.Fatalf("expect: %#v, got: %#v", expect, c)
|
|
}
|
|
}
|