From 4c515a3f2beade7df7ba06a572bfc1581da8d6aa Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Mon, 10 Dec 2012 08:19:21 +0100 Subject: Add dependency selftests for =/!=. Also add tests for misc. other forms. --- kconfigtest.py | 2 +- tests/Kdep | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/kconfigtest.py b/kconfigtest.py index 5490939..c94edd1 100644 --- a/kconfigtest.py +++ b/kconfigtest.py @@ -338,7 +338,7 @@ def run_selftests(): format(dep.get_name(), sym.get_name())) # Test twice to cover dependency caching for i in range(0, 2): - n_deps = 14 + n_deps = 28 verify_dependent("D", ["D{0}".format(i) for i in range(1, n_deps + 1)]) # Choices verify_dependent("A", ["B", "C"]) diff --git a/tests/Kdep b/tests/Kdep index fe99283..3d2b95c 100644 --- a/tests/Kdep +++ b/tests/Kdep @@ -75,9 +75,52 @@ config D13 endif endmenu -# Complicated expression +# Different kinds of expressions + config D14 - bool "D14" if n || (y && n || (m || D)) + bool "D14" if D || n + +config D15 + bool "D15" if n || D + +config D16 + bool "D16" if D && y + +config D17 + bool "D17" if y && D + +config D18 + bool "D18" if !D + +config D19 + bool "D19" if !D && y + +config D20 + bool "D20" if !(D && y) + +config D21 + bool "D21" if (D) + +config D22 + bool "D22" if ((D)) + +config D23 + bool "D23" if n || (y && n || (m || D)) + +config D24 + bool "D24" if D = n + +config D25 + bool "D25" if n = D + +config D26 + bool "D26" if n != D + +config D27 + bool "D27" if D != n + +config D28 + bool "D28" if n || ((n != D) || n) # # Choices -- cgit v1.2.3