2015-09-09 20:02:39 +00:00
|
|
|
package api
|
|
|
|
|
|
|
|
import (
|
|
|
|
"reflect"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestCompose_Constraints(t *testing.T) {
|
2015-10-27 21:31:14 +00:00
|
|
|
c := NewConstraint("kernel.name", "=", "darwin")
|
2015-09-09 20:02:39 +00:00
|
|
|
expect := &Constraint{
|
|
|
|
LTarget: "kernel.name",
|
|
|
|
RTarget: "darwin",
|
|
|
|
Operand: "=",
|
|
|
|
}
|
|
|
|
if !reflect.DeepEqual(c, expect) {
|
|
|
|
t.Fatalf("expect: %#v, got: %#v", expect, c)
|
|
|
|
}
|
|
|
|
}
|