From 70d404aae538bbdf22b5b515de6e71705fc39e66 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 10 Jun 2016 23:21:06 -0400 Subject: [PATCH] nitunit: use shorter names in the XML Signed-off-by: Jean Privat --- src/testing/testing_doc.nit | 7 ++++--- src/testing/testing_suite.nit | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/testing/testing_doc.nit b/src/testing/testing_doc.nit index 1cdd10a..1180bff 100644 --- a/src/testing/testing_doc.nit +++ b/src/testing/testing_doc.nit @@ -524,7 +524,7 @@ redef class ModelBuilder var ndoc = nclassdef.n_doc if ndoc != null then doc_entities += 1 - d2m.extract(ndoc.to_mdoc, "nitunit." + mmodule.full_name + "." + mclassdef.mclass.full_name, "") + d2m.extract(ndoc.to_mdoc, "nitunit." + mclassdef.full_name.replace("$", "."), "") end end for npropdef in nclassdef.n_propdefs do @@ -534,7 +534,8 @@ redef class ModelBuilder var ndoc = npropdef.n_doc if ndoc != null then doc_entities += 1 - d2m.extract(ndoc.to_mdoc, "nitunit." + mmodule.full_name + "." + mclassdef.mclass.full_name, mpropdef.mproperty.full_name) + var a = mpropdef.full_name.split("$") + d2m.extract(ndoc.to_mdoc, "nitunit." + a[0] + "." + a[1], a[2]) end end end @@ -566,7 +567,7 @@ redef class ModelBuilder doc_entities += 1 # NOTE: jenkins expects a '.' in the classname attr - d2m.extract(mdoc, "nitunit." + mgroup.full_name, "") + d2m.extract(mdoc, "nitunit." + mgroup.mpackage.name + "." + mgroup.name + ".", "") d2m.run_tests diff --git a/src/testing/testing_suite.nit b/src/testing/testing_suite.nit index e0ab351..7c60b83 100644 --- a/src/testing/testing_suite.nit +++ b/src/testing/testing_suite.nit @@ -310,12 +310,13 @@ class TestCase end redef fun xml_classname do - var mclassdef = test_method.mclassdef - return "nitunit." + mclassdef.mmodule.full_name + "." + mclassdef.mclass.full_name + var a = test_method.full_name.split("$") + return "nitunit.{a[0]}.{a[1]}" end redef fun xml_name do - return test_method.mproperty.full_name + var a = test_method.full_name.split("$") + return a[2] end end -- 1.7.9.5