aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/libgdiagnostics.dg/test-logical-location-c.py
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/libgdiagnostics.dg/test-logical-location-c.py')
-rw-r--r--gcc/testsuite/libgdiagnostics.dg/test-logical-location-c.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/libgdiagnostics.dg/test-logical-location-c.py b/gcc/testsuite/libgdiagnostics.dg/test-logical-location-c.py
index 7448a1e..55f338b 100644
--- a/gcc/testsuite/libgdiagnostics.dg/test-logical-location-c.py
+++ b/gcc/testsuite/libgdiagnostics.dg/test-logical-location-c.py
@@ -31,7 +31,16 @@ def test_sarif_output_with_logical_location(sarif):
assert len(location['logicalLocations']) == 1
logical_loc = location['logicalLocations'][0]
+ assert logical_loc['index'] == 0
+ assert logical_loc['fullyQualifiedName'] == 'test_qualified_name'
+
+ # Check theRun.logicalLocations
+ assert 'logicalLocations' in run
+ assert len(run['logicalLocations']) == 1
+ logical_loc = run['logicalLocations'][0]
assert logical_loc['name'] == 'test_short_name'
assert logical_loc['fullyQualifiedName'] == 'test_qualified_name'
assert logical_loc['decoratedName'] == 'test_decorated_name'
assert logical_loc['kind'] == 'function'
+ assert logical_loc['index'] == 0
+