| 1 |
/* Test of the "no diagnostics are emitted" case. */ |
| 2 |
|
| 3 |
#include "libgdiagnostics.h" |
| 4 |
#include "test-helpers.h" |
| 5 |
|
| 6 |
int |
| 7 |
main () |
| 8 |
{ |
| 9 |
begin_test ("test-no-diagnostics.c.exe", |
| 10 |
"test-no-diagnostics.c.sarif", |
| 11 |
__FILE__, "c"); |
| 12 |
|
| 13 |
/* No-op. */ |
| 14 |
|
| 15 |
return end_test (); |
| 16 |
}; |
| 17 |
|
| 18 |
/* There should be no output from the text sink. */ |
| 19 |
|
| 20 |
/* Verify that some JSON was written to a file with the expected name: |
| 21 |
{ dg-final { verify-sarif-file } } */ |
| 22 |
|
| 23 |
/* Use a Python script to verify various properties about the generated |
| 24 |
.sarif file: |
| 25 |
{ dg-final { run-sarif-pytest test-no-diagnostics.c "test-no-diagnostics-c.py" } } */ |