|
1 | 1 | // RUN: not %target-swift-frontend -color-diagnostics -enable-educational-notes -diagnostic-documentation-path %S/test-docs/ -typecheck %s 2>&1 | %FileCheck %s --match-full-lines --strict-whitespace
|
2 | 2 | // RUN: not %target-swift-frontend -no-color-diagnostics -enable-educational-notes -diagnostic-documentation-path %S/test-docs/ -typecheck %s 2>&1 | %FileCheck %s --match-full-lines --strict-whitespace --check-prefix=NO-COLOR
|
| 3 | +// RUN: not %target-swift-frontend -enable-experimental-diagnostic-formatting -enable-educational-notes -diagnostic-documentation-path %S/test-docs/ -typecheck %s 2>&1 | %FileCheck %s --check-prefix=CHECK-DESCRIPTIVE |
3 | 4 |
|
4 | 5 | // A diagnostic with no educational notes
|
5 | 6 | let x = 1 +
|
@@ -66,3 +67,18 @@ extension (Int, Int) {}
|
66 | 67 | // NO-COLOR-NEXT:--------------
|
67 | 68 | // NO-COLOR-NEXT:Header 1
|
68 | 69 | // NO-COLOR-NEXT:Header 3
|
| 70 | + |
| 71 | +// CHECK-DESCRIPTIVE: educational-notes.swift |
| 72 | +// CHECK-DESCRIPTIVE-NEXT: | // A diagnostic with an educational note |
| 73 | +// CHECK-DESCRIPTIVE-NEXT: | extension (Int, Int) {} |
| 74 | +// CHECK-DESCRIPTIVE-NEXT: | ^ error: expected expression after operator |
| 75 | +// CHECK-DESCRIPTIVE-NEXT: | |
| 76 | + |
| 77 | +// CHECK-DESCRIPTIVE: educational-notes.swift |
| 78 | +// CHECK-DESCRIPTIVE-NEXT: | // A diagnostic with an educational note |
| 79 | +// CHECK-DESCRIPTIVE-NEXT: | extension (Int, Int) {} |
| 80 | +// CHECK-DESCRIPTIVE-NEXT: | ~~~~~~~~~~ |
| 81 | +// CHECK-DESCRIPTIVE-NEXT: | ^ error: non-nominal type '(Int, Int)' cannot be extended |
| 82 | +// CHECK-DESCRIPTIVE-NEXT: | |
| 83 | +// CHECK-DESCRIPTIVE-NEXT: Nominal Types |
| 84 | +// CHECK-DESCRIPTIVE-NEXT: ------------- |
0 commit comments