예제 #1
0
func throwMisMatchTypeError(arg SassValue, expectedType string) error {
	var intf interface{}
	unmarshal(arg, &intf)
	svinf := libs.Interface(arg.Val())
	return fmt.Errorf("Invalid Sass type expected: %s got: %T value: %v",
		expectedType, svinf, svinf)
}
예제 #2
0
func TestSV_equal(t *testing.T) {
	b := libs.MakeBool(true)
	bb := libs.MakeBool(true)

	if libs.Interface(b) != libs.Interface(bb) {
		t.Fatal("equal failed")
	}

	c := libs.MakeColor(color.RGBA{})
	cc := libs.MakeColor(color.RGBA{})

	if libs.Interface(c) != libs.Interface(cc) {
		t.Fatal("equal failed")
	}

	s := libs.MakeString("hi")
	ss := libs.MakeString("hi")
	if libs.Interface(s) != libs.Interface(ss) {
		t.Fatal("equal failed")
	}
}