summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2017-11-03 00:21:52 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2017-11-03 01:12:53 +0100
commitb3d65345e010628a100f6a9f0b0817b0bd462543 (patch)
tree91e1e5d26475a246e6dd97cc6ac93b31e5e6b5db
parentd4634ba8f0d6d53872b0a744fee9111d55334550 (diff)
Test suite nits
-rw-r--r--testsuite.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/testsuite.py b/testsuite.py
index cfaebfc..e750cbf 100644
--- a/testsuite.py
+++ b/testsuite.py
@@ -265,11 +265,11 @@ def run_selftests():
verify_eval("M", 1)
verify_eval("(Y || N) && (m && y)", 1)
- # Non-bool/non-tristate symbols are always "n" in a tristate sense
+ # Non-bool/non-tristate symbols are always n in a tristate sense
verify_eval("Y_STRING", 0)
verify_eval("Y_STRING || m", 1)
- # As are all constants besides "y" and "m"
+ # As are all constants besides y and m
verify_eval('"foo"', 0)
verify_eval('"foo" || "bar"', 0)
verify_eval('"foo" || m', 1)
@@ -1098,6 +1098,7 @@ g
"{} should not have a user value after being reset".
format(s.name))
+
print("Testing defined vs undefined symbols")
for name in "A", "B", "C", "D", "BOOL", "TRISTATE", "STRING", "INT", "HEX":
@@ -1123,6 +1124,7 @@ g
verify(c.syms[name].choice is None,
"{} should not be a choice symbol".format(name))
+
print("Testing is_allnoconfig_y")
verify(not c.syms["NOT_ALLNOCONFIG_Y"].is_allnoconfig_y,
@@ -1268,7 +1270,7 @@ g
assign_and_verify("DIRECT_DEP", 2)
# Verify that IMPLIED_TRISTATE can be set to anything when IMPLY has value
- # "n", and that it gets the value "n" by default (for non-imply-related
+ # n, and that it gets the value n by default (for non-imply-related
# reasons)
assign_and_verify("IMPLY", 0)
@@ -1278,7 +1280,7 @@ g
c.syms["IMPLIED_TRISTATE"].unset_value()
verify_value("IMPLIED_TRISTATE", "n")
- # Same as above for "m". Anything still goes, but "m" by default now.
+ # Same as above for m. Anything still goes, but m by default now.
assign_and_verify("IMPLY", 1)
assign_and_verify("IMPLIED_TRISTATE", 0)
@@ -1287,8 +1289,8 @@ g
c.syms["IMPLIED_TRISTATE"].unset_value()
verify_value("IMPLIED_TRISTATE", 1)
- # Same as above for "y". Only "n" and "y" should be accepted. "m" gets
- # promoted to "y". Default should be "y".
+ # Same as above for y. Only n and y should be accepted. m gets promoted to
+ # y. Default should be y.
assign_and_verify("IMPLY", 2)
assign_and_verify("IMPLIED_TRISTATE", 0)
@@ -1297,7 +1299,7 @@ g
c.syms["IMPLIED_TRISTATE"].unset_value()
verify_value("IMPLIED_TRISTATE", 2)
- # Being implied to either "m" or "y" should give a bool the value "y"
+ # Being implied to either m or y should give a bool the value y
c.syms["IMPLY"].unset_value()
verify_value("IMPLIED_BOOL", 0)
@@ -1308,7 +1310,7 @@ g
assign_and_verify("IMPLY", 2)
verify_value("IMPLIED_BOOL", 2)
- # A bool implied to "m" or "y" can take the values "n" and "y"
+ # A bool implied to m or y can take the values n and y
c.syms["IMPLY"].set_value(1)
assign_and_verify("IMPLIED_BOOL", 0)