Files
codeql/swift/codegen/templates/ql_test_class.mustache
Paolo Tranquilli 86ebb0bb68 Swift: fix qltest skipping and skip isUnknown
Also remove obsolete accessor and function hand-written tests.
2022-06-15 09:16:55 +02:00

17 lines
526 B
Plaintext

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