From fffd30e6ea060b2abebb7ba9cdf881da00ca4cb9 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sun, 17 Sep 2017 04:23:40 +0200 Subject: Add 'imply' support This is like a 'select' that only changes the default value of a symbol, not limiting what values the user can set it to (with one exception: A symbol implied to 'y' can't be set to 'm'). Symbol.get_implied_symbols() was added, corresponding to Symbol.get_selected_symbols(), and Symbol.__str__() was extended to print implied symbols and weak reverse dependencies. Weak reverse dependencies are the 'imply' version of 'select's reverse dependencies. --- tests/Kbounds | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'tests/Kbounds') diff --git a/tests/Kbounds b/tests/Kbounds index 9b10a3e..52e61c9 100644 --- a/tests/Kbounds +++ b/tests/Kbounds @@ -39,6 +39,39 @@ config M_SELECTED_TRISTATE config M_SELECTED_M_VISIBLE_TRISTATE tristate "m-selected m-visible tristate" if m +config N_IMPLIER + def_tristate n + imply N_IMPLIED_BOOL + imply N_IMPLIED_TRISTATE + +config M_IMPLIER + def_tristate m + imply M_IMPLIED_BOOL + imply M_IMPLIED_TRISTATE + +config Y_IMPLIER + def_tristate y + imply Y_IMPLIED_BOOL + imply Y_IMPLIED_TRISTATE + +config N_IMPLIED_BOOL + bool "n-implied bool" + +config N_IMPLIED_TRISTATE + tristate "n-implied tristate" + +config M_IMPLIED_BOOL + bool "m-implied bool" + +config M_IMPLIED_TRISTATE + tristate "m-implied tristate" + +config Y_IMPLIED_BOOL + bool "y-implied bool" + +config Y_IMPLIED_TRISTATE + tristate "y-implied tristate" + config STRING string "string" -- cgit v1.2.3