Files
codeql/swift/codegen/templates/ql_test_class.mustache
2022-12-07 13:46:51 +01:00

17 lines
532 B
Plaintext

// generated by {{generator}}
import codeql.swift.elements
import TestUtils
from {{class_name}} x{{#properties}}, {{#type}}{{.}}{{/type}}{{^type}}string{{/type}} {{getter}}{{/properties}}
where toBeTested(x) and not x.isUnknown()
{{#properties}}
{{#type}}
and {{getter}} = x.{{getter}}()
{{/type}}
{{^type}}
and if x.{{getter}}() then {{getter}} = "yes" else {{getter}} = "no"
{{/type}}
{{/properties}}
select x{{#show_ql_class}}, x.getPrimaryQlClasses(){{/show_ql_class}}{{#properties}}, "{{getter}}:", {{getter}}{{/properties}}