Return whether a required api name matches a pattern specified for an XML 'api' attribute or 'supported' attribute. - str - API name such as 'vulkan' or 'openxr'. May be None, in which case it never matches (this should not happen). - supported - comma-sepa
(str, supported)
| 18 | from pyparsing import ParseException |
| 19 | |
| 20 | def apiNameMatch(str, supported): |
| 21 | """Return whether a required api name matches a pattern specified for an |
| 22 | XML <feature> 'api' attribute or <extension> 'supported' attribute. |
| 23 | |
| 24 | - str - API name such as 'vulkan' or 'openxr'. May be None, in which |
| 25 | case it never matches (this should not happen). |
| 26 | - supported - comma-separated list of XML API names. May be None, in |
| 27 | which case str always matches (this is the usual case).""" |
| 28 | |
| 29 | if str is not None: |
| 30 | return supported is None or str in supported.split(',') |
| 31 | |
| 32 | # Fallthrough case - either str is None or the test failed |
| 33 | return False |
| 34 | |
| 35 | def matchAPIProfile(api, profile, elem): |
| 36 | """Return whether an API and profile |
no outgoing calls
no test coverage detected