summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FileAPI/codemodel-v2-check.py
blob: 8e65acb81ad26bb931a583cbaca1643f6c3703e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from check_index import *

def check_objects(o):
    assert is_list(o)
    assert len(o) == 1
    check_index_object(o[0], "codemodel", 2, 0, check_object_codemodel)

def check_object_codemodel(o):
    assert sorted(o.keys()) == ["configurations", "kind", "paths", "version"]
    # The "kind" and "version" members are handled by check_index_object.
    # FIXME: Check "configurations"  and "paths" members

assert is_dict(index)
assert sorted(index.keys()) == ["cmake", "objects", "reply"]
check_objects(index["objects"])