mirror of
https://github.com/github/codeql.git
synced 2026-05-05 21:55:19 +02:00
Move swift/codegen to misc/codegen
This commit is contained in:
16
misc/codegen/templates/ql_test_class.mustache
Normal file
16
misc/codegen/templates/ql_test_class.mustache
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by {{generator}}
|
||||
|
||||
import {{elements_module}}
|
||||
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}}
|
||||
Reference in New Issue
Block a user