alpha_comparator.sort(fs)
# Try each entry as a group or a module
for f in fs do
+ if f.first == '.' then continue
var af = a/f
mgroup = identify_group(af)
if mgroup != null then
var files = p.files
alpha_comparator.sort(files)
for f in files do
+ if f.first == '.' then continue
var fp = p/f
var g = identify_group(fp)
# Recursively scan for groups of the same package
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
# See the License for the specific language governing permissions and
# limitations under the License.
- module test_model_json is test_suite
+ module test_model_json is test
- import test_suite
import model_json
import frontend
class TestModelSerialization
- super TestSuite
+ test
var suite_path: String = "NIT_TESTING_PATH".environ
var lib_path: String = "{suite_path.dirname}/../../tests/test_prog"
return model
end
- fun test_refs_to_full_json do
+ fun test_refs_to_full_json is test do
var mentities = new Array[MEntity]
mentities.add model.mpackages.first
mentities.add model.mmodules.first
end
end
- fun test_packages_to_full_json do
+ fun test_packages_to_full_json is test do
for mentity in model.mpackages do
print mentity.to_pretty_full_json
end
end
- fun test_groups_to_full_json do
+ fun test_groups_to_full_json is test do
for mpackage in model.mpackages do
for mentity in mpackage.mgroups do
print mentity.to_pretty_full_json
end
end
- fun test_modules_to_full_json do
+ fun test_modules_to_full_json is test do
for mentity in model.mmodules do
print mentity.to_pretty_full_json
end
end
- fun test_classes_to_full_json do
+ fun test_classes_to_full_json is test do
for mentity in model.mclasses do
print mentity.to_pretty_full_json
end
end
- fun test_classdefs_to_full_json do
+ fun test_classdefs_to_full_json is test do
for mclass in model.mclasses do
for mentity in mclass.mclassdefs do
print mentity.to_pretty_full_json
end
end
- fun test_props_to_full_json do
+ fun test_props_to_full_json is test do
for mentity in model.mproperties do
print mentity.to_pretty_full_json
end
end
- fun test_propdefs_to_full_json do
+ fun test_propdefs_to_full_json is test do
for mprop in model.mproperties do
for mentity in mprop.mpropdefs do
print mentity.to_pretty_full_json
end
end
-redef class Location
+redef class nitc::Location
serialize
# Avoid diff on location absolute path
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
v.serialize_attribute("mdoc", mentity.mdoc_or_fallback)
v.serialize_attribute("visibility", mentity.visibility.to_s)
v.serialize_attribute("modifiers", mentity.collect_modifiers)
+ v.serialize_attribute("class_name", mentity.class_name)
var mentity = self.mentity
if mentity isa MMethod then
v.serialize_attribute("msignature", mentity.intro.msignature)
# Add doc down processing
redef fun core_serialize_to(v) do
v.serialize_attribute("html_synopsis", html_synopsis.write_to_string)
- v.serialize_attribute("html_documentation", html_documentation.write_to_string)
end
end
redef class POSetElement[E]
super Serializable
- redef fun serialize_to(v) do
+ redef fun core_serialize_to(v) do
assert self isa POSetElement[MEntity]
- v.serialize_attribute("greaters", to_mentity_refs(greaters))
v.serialize_attribute("direct_greaters", to_mentity_refs(direct_greaters))
v.serialize_attribute("direct_smallers", to_mentity_refs(direct_smallers))
- v.serialize_attribute("smallers", to_mentity_refs(smallers))
end
end