From 7f26a0455592ce99ba64b7382744e641c0bf88b3 Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Tue, 26 Sep 2017 16:46:44 -0400 Subject: [PATCH] model_visitor: reject is_before and is_after as they are tests Signed-off-by: Alexandre Terrasa --- src/model/model_visitor.nit | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/model/model_visitor.nit b/src/model/model_visitor.nit index a2807de..9244055 100644 --- a/src/model/model_visitor.nit +++ b/src/model/model_visitor.nit @@ -109,7 +109,14 @@ abstract class ModelVisitor # Can we accept this `mentity` regarding its test suite status? fun accept_test(mentity: MEntity): Bool do if include_test then return true - if not mentity isa MModule then return true + if mentity isa MProperty then + if mentity.is_before or mentity.is_before_all then return false + if mentity.is_after or mentity.is_after_all then return false + end + if mentity isa MPropDef then + if mentity.is_before or mentity.is_before_all then return false + if mentity.is_after or mentity.is_after_all then return false + end return not mentity.is_test end -- 1.7.9.5