• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/python3 -i
2#
3# Copyright (c) 2018-2019 Collabora, Ltd.
4#
5# SPDX-License-Identifier: Apache-2.0
6#
7# Author(s):    Ryan Pavlik <ryan.pavlik@collabora.com>
8
9
10import pytest
11
12from check_spec_links import VulkanEntityDatabase
13
14
15@pytest.fixture
16def db():
17    ret = VulkanEntityDatabase()
18    # print(ret.getEntityJson())
19    return ret
20
21
22def test_likely_recognized(db):
23    assert(db.likelyRecognizedEntity('vkBla'))
24    assert(db.likelyRecognizedEntity('VkBla'))
25    assert(db.likelyRecognizedEntity('VK_BLA'))
26
27
28def test_db(db):
29    assert(db.findEntity('vkCreateInstance'))
30
31    # VKAPI_CALL is not referenced, so not added to EntityDatabase.
32    # assert(db.findEntity('VKAPI_CALL'))
33