end
end
var ms = gs
- if m.is_test_suite then ms /= 100.0
+ if m.is_test then ms /= 100.0
entity_score += ms
if m.mdoc != null then doc_score += ms else ms /= 10.0
for cd in m.mclassdefs do
mmodule.mdoc = mdoc
mdoc.original_mentity = mmodule
end
- # Is the module a test suite?
- mmodule.is_test_suite = not decl.get_annotations("test_suite").is_empty
# Is the module generated?
mmodule.is_generated = not decl.get_annotations("generated").is_empty
end
end
end
- # Is `self` a unit test module used by `nitunit`?
- var is_test_suite: Bool = false is writable
-
# Is `self` a module generated by a tool?
#
# This flag has no effect on the semantic.
v.include_fictive = self.include_fictive
v.include_empty_doc = self.include_empty_doc
v.include_attribute = self.include_attribute
- v.include_test_suite = self.include_test_suite
+ v.include_test = self.include_test
end
# Searches the MEntity that matches `full_name`.
# Should we accept nitunit test suites?
#
# Default is `false`.
- var include_test_suite = false is writable
+ var include_test = false is writable
# Can we accept this `mentity` regarding its test suite status?
- fun accept_test_suite(mentity: MEntity): Bool do
- if include_test_suite then return true
+ fun accept_test(mentity: MEntity): Bool do
+ if include_test then return true
if not mentity isa MModule then return true
- return not mentity.is_test_suite
+ return not mentity.is_test
end
# Should we accept `MAttribute` instances?
if not accept_visibility(mentity) then return false
if not accept_fictive(mentity) then return false
if not accept_empty_doc(mentity) then return false
- if not accept_test_suite(mentity) then return false
+ if not accept_test(mentity) then return false
if not accept_attribute(mentity) then return false
return true
end
view.include_fictive = true
view.include_empty_doc = true
view.include_attribute = true
- view.include_test_suite = true
+ view.include_test = true
return view
end
end