Files
codeql/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl.ql
Paolo Tranquilli 6bbf1e3bc1 Codegen: use one generated test file per directory
This collapses all generated test QL sources into a single one per
directory, using query predicates to run the different tests.

This should improve the time required to run generated tests.
2025-06-25 11:44:54 +02:00

51 lines
2.4 KiB
Plaintext
Generated

// generated by codegen/codegen.py, do not edit
import codeql.swift.elements
import TestUtils
query predicate instances(
ModuleDecl x, string getModule__label, ModuleDecl getModule, string getNumberOfMembers__label,
int getNumberOfMembers, string getInterfaceType__label, Type getInterfaceType,
string getName__label, string getName, string getNumberOfInheritedTypes__label,
int getNumberOfInheritedTypes, string isBuiltinModule__label, string isBuiltinModule,
string isSystemModule__label, string isSystemModule, string getNumberOfImportedModules__label,
int getNumberOfImportedModules, string getNumberOfExportedModules__label,
int getNumberOfExportedModules
) {
toBeTested(x) and
not x.isUnknown() and
getModule__label = "getModule:" and
getModule = x.getModule() and
getNumberOfMembers__label = "getNumberOfMembers:" and
getNumberOfMembers = x.getNumberOfMembers() and
getInterfaceType__label = "getInterfaceType:" and
getInterfaceType = x.getInterfaceType() and
getName__label = "getName:" and
getName = x.getName() and
getNumberOfInheritedTypes__label = "getNumberOfInheritedTypes:" and
getNumberOfInheritedTypes = x.getNumberOfInheritedTypes() and
isBuiltinModule__label = "isBuiltinModule:" and
(if x.isBuiltinModule() then isBuiltinModule = "yes" else isBuiltinModule = "no") and
isSystemModule__label = "isSystemModule:" and
(if x.isSystemModule() then isSystemModule = "yes" else isSystemModule = "no") and
getNumberOfImportedModules__label = "getNumberOfImportedModules:" and
getNumberOfImportedModules = x.getNumberOfImportedModules() and
getNumberOfExportedModules__label = "getNumberOfExportedModules:" and
getNumberOfExportedModules = x.getNumberOfExportedModules()
}
query predicate getMember(ModuleDecl x, int index, Decl getMember) {
toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index)
}
query predicate getInheritedType(ModuleDecl x, int index, Type getInheritedType) {
toBeTested(x) and not x.isUnknown() and getInheritedType = x.getInheritedType(index)
}
query predicate getAnImportedModule(ModuleDecl x, ModuleDecl getAnImportedModule) {
toBeTested(x) and not x.isUnknown() and getAnImportedModule = x.getAnImportedModule()
}
query predicate getAnExportedModule(ModuleDecl x, ModuleDecl getAnExportedModule) {
toBeTested(x) and not x.isUnknown() and getAnExportedModule = x.getAnExportedModule()
}