Lines Matching refs:t
80 func TestAliasVariation(t *testing.T) {
82 t.Helper()
101 t.Errorf("unexpected parse errors:")
103 t.Errorf(" %s", err)
110 t.Errorf("unexpected dep errors:")
112 t.Errorf(" %s", err)
119 t.Errorf("unexpected dep error: %s", err)
124 t.Errorf("missing dep error: %s", expectedErr)
129 t.Helper()
133 t.Run("simple", func(t *testing.T) {
147 t.Fatalf("expected foo deps to be %q, got %q", w, g)
151 t.Run("chained", func(t *testing.T) {
167 t.Fatalf("expected foo deps to be %q, got %q", w, g)
171 t.Run("chained2", func(t *testing.T) {
187 t.Fatalf("expected foo deps to be %q, got %q", w, g)
191 t.Run("removed dangling alias", func(t *testing.T) {
207 func TestCreateAliasVariations(t *testing.T) {
209 t.Helper()
228 t.Errorf("unexpected parse errors:")
230 t.Errorf(" %s", err)
237 t.Errorf("unexpected dep errors:")
239 t.Errorf(" %s", err)
246 t.Errorf("unexpected dep error: %s", err)
251 t.Errorf("missing dep error: %s", expectedErr)
256 t.Helper()
260 t.Run("simple", func(t *testing.T) {
274 t.Fatalf("expected foo deps to be %q, got %q", w, g)
278 t.Run("chained", func(t *testing.T) {
294 t.Fatalf("expected foo deps to be %q, got %q", w, g)
298 t.Run("removed dangling alias", func(t *testing.T) {
314 func expectedErrors(t *testing.T, errs []error, expectedMessages ...string) {
315 t.Helper()
317 t.Errorf("expected %d error, found: %q", len(expectedMessages), errs)
322 t.Errorf("expected error %q found %q", expected, err)
328 func TestAddVariationDependencies(t *testing.T) {
330 t.Helper()
349 t.Errorf("unexpected parse errors:")
351 t.Errorf(" %s", err)
358 t.Errorf("unexpected dep errors:")
360 t.Errorf(" %s", err)
367 t.Errorf("unexpected dep error: %s", err)
372 t.Errorf("missing dep error: %s", expectedErr)
377 t.Helper()
381 t.Run("parallel", func(t *testing.T) {
394 t.Fatalf("expected foo deps to be %q, got %q", w, g)
398 t.Fatalf("expected AddVariationDependencies return value to be %q, got %q", w, g)
402 t.Run("non-parallel", func(t *testing.T) {
414 t.Fatalf("expected foo deps to be %q, got %q", w, g)
418 t.Fatalf("expected AddVariationDependencies return value to be %q, got %q", w, g)
422 t.Run("missing", func(t *testing.T) {
433 t.Fatalf("expected foo deps to be %q, got %q", w, g)
437 t.Fatalf("expected AddVariationDependencies return value to be %q, got %q", w, g)
441 t.Run("allow missing", func(t *testing.T) {
453 t.Fatalf("expected foo deps to be %q, got %q", w, g)
457 t.Fatalf("expected AddVariationDependencies return value to be %q, got %q", w, g)
463 func TestCheckBlueprintSyntax(t *testing.T) {
468 t.Run("valid", func(t *testing.T) {
474 expectedErrors(t, errs)
477 t.Run("syntax error", func(t *testing.T) {
484 expectedErrors(t, errs, `path/Blueprint:5:1: expected "}", found EOF`)
487 t.Run("unknown module type", func(t *testing.T) {
494 expectedErrors(t, errs, `path/Blueprint:2:1: unrecognized module type "test2"`)
497 t.Run("unknown property name", func(t *testing.T) {
504 expectedErrors(t, errs, `path/Blueprint:3:5: unrecognized property "nam"`)
507 t.Run("invalid property type", func(t *testing.T) {
514 expectedErrors(t, errs, `path/Blueprint:3:8: can't assign bool value to string property "name"`)
517 t.Run("multiple failures", func(t *testing.T) {
528 expectedErrors(t, errs,