Commit graph

11 commits

Author SHA1 Message Date
whitequark 11914a1e67 hdl.ast: improve interaction of ValueCastable with custom __getattr__.
Avoid calling `__getattr__("_ValueCastable__lowered_to")` when
a ValueCastable has custom `__getattr__` implementation; this avoids
the need for downstream code to be aware of this implementataion
detail.
2021-10-03 20:28:07 +00:00
whitequark e88d283ed3 hdl.ast: simplify Mux implementation. 2021-10-02 14:18:02 +00:00
whitequark 65499d5c45 hdl.ast: add tests for casting bare integers in {Cat,Repl}. 2021-10-02 13:18:11 +00:00
Robin Ole Heinemann b38b2cdad7 test.test_hdl_ast.OperatorTestCase: remove duplicate test_bool 2021-05-18 20:18:55 +00:00
Robin Ole Heinemann 2d85f888d6 tests: rename tests with duplicate names 2021-05-18 20:18:55 +00:00
whitequark c30dcea24d hdl.ast: handle int subclasses as slice start/stop values.
Fixes #601.
2021-03-18 23:52:23 +00:00
whitequark 818c8bc464 hdl.ast: normalize case values to two's complement, not signed binary.
This was an especially insidious bug because the minus character is
valid in case values but has a completely different meaning (wildcard
rather than sign).

Fixes #559.
2020-12-12 12:42:12 +00:00
whitequark bde37fe2f2 hdl.ast: deprecate UserValue in favor of ValueCastable.
Closes #527.
2020-11-06 02:21:53 +00:00
awygle 06c734992f
hdl.ast: implement ValueCastable.
Closes RFC issue #355.
2020-11-06 00:20:54 +00:00
whitequark fde242aa47 hdl.ast: clarify exception message for out of bounds indexing.
Fixes #488.
2020-08-27 01:14:05 +00:00
whitequark 67b957d4f4 tests: move out of the main package.
Compared to tests in the repository root, tests in the package have
many downsides:
  * Unless explicitly excluded in find_packages(), tests and their
    support code effectively become a part of public API.
    This, unfortunately, happened with FHDLTestCase, which was never
    intended for downstream use.
  * Even if explicitly excluded from the setuptools package, using
    an editable install, or setting PYTHONPATH still allows accessing
    the tests.
  * Having a sub-package that is present in the source tree but not
    exported (or, worse, exported only sometimes) is confusing.
  * The name `nmigen.test` cannot be used for anything else, such as
    testing utilities that *are* intended for downstream use.
2020-08-27 00:33:31 +00:00
Renamed from nmigen/test/test_hdl_ast.py (Browse further)