Lines Matching refs:t
60 func TestAliases(t *testing.T) {
62 t.Helper()
81 t.Errorf("unexpected parse errors:")
83 t.Errorf(" %s", err)
90 t.Errorf("unexpected dep errors:")
92 t.Errorf(" %s", err)
99 t.Errorf("unexpected dep error: %s", err)
104 t.Errorf("missing dep error: %s", expectedErr)
109 t.Helper()
113 t.Run("simple", func(t *testing.T) {
127 t.Fatalf("expected bar.modules[1] variant to be %q, got %q", w, g)
131 t.Fatalf("expected foo deps to be %q, got %q", w, g)
135 t.Run("chained", func(t *testing.T) {
151 t.Fatalf("expected bar.modules[3] variant to be %q, got %q", w, g)
155 t.Fatalf("expected foo deps to be %q, got %q", w, g)
159 t.Run("chained2", func(t *testing.T) {
175 t.Fatalf("expected bar.modules[1] variant to be %q, got %q", w, g)
179 t.Fatalf("expected foo deps to be %q, got %q", w, g)
183 t.Run("removed dangling alias", func(t *testing.T) {
199 func expectedErrors(t *testing.T, errs []error, expectedMessages ...string) {
200 t.Helper()
202 t.Errorf("expected %d error, found: %q", len(expectedMessages), errs)
207 t.Errorf("expected error %q found %q", expected, err)
213 func TestCheckBlueprintSyntax(t *testing.T) {
218 t.Run("valid", func(t *testing.T) {
224 expectedErrors(t, errs)
227 t.Run("syntax error", func(t *testing.T) {
234 expectedErrors(t, errs, `path/Blueprint:5:1: expected "}", found EOF`)
237 t.Run("unknown module type", func(t *testing.T) {
244 expectedErrors(t, errs, `path/Blueprint:2:1: unrecognized module type "test2"`)
247 t.Run("unknown property name", func(t *testing.T) {
254 expectedErrors(t, errs, `path/Blueprint:3:5: unrecognized property "nam"`)
257 t.Run("invalid property type", func(t *testing.T) {
264 expectedErrors(t, errs, `path/Blueprint:3:8: can't assign bool value to string property "name"`)
267 t.Run("multiple failures", func(t *testing.T) {
278 expectedErrors(t, errs,