From b59b618a0ce85632742ff92a5be2bab690a75e42 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Fri, 3 Nov 2017 03:17:58 +0100 Subject: Add initial selftests for .assignable Comprehensive selftests are important here, because the allno/yesconfig.py scripts only check the upper and lower bound, and allnoconfig disables modules. Found a bug for non-selected m-visible tristates, where n didn't show up in sym.assignable. Everything matches menuconfig after fixing that. Still need to test symbols in choices with different modes, imply, and .assignable for choices. --- kconfiglib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index 8bb8957..612fc58 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -2726,8 +2726,10 @@ class Symbol(object): # vis == 1 + # Must be a tristate here, because bool m visibility gets promoted to y + if not rev_dep_val: - return (1,) if expr_value(self.weak_rev_dep) != 2 else (2,) + return (0, 1) if expr_value(self.weak_rev_dep) != 2 else (0, 2) if rev_dep_val == 2: return (2,) -- cgit v1.2.3