-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hdl.rec: don't save casted shapes in Layout constructor #394
hdl.rec: don't save casted shapes in Layout constructor #394
Conversation
Codecov Report
@@ Coverage Diff @@
## master #394 +/- ##
=======================================
Coverage 82.10% 82.10%
=======================================
Files 36 36
Lines 6075 6075
Branches 1234 1234
=======================================
Hits 4988 4988
+ Misses 914 913 -1
- Partials 173 174 +1
Continue to review full report at Codecov.
|
Looks like I missed some tests, let me fix those up |
a3bdaa4
to
f432fe4
Compare
@@ -12,6 +12,11 @@ class UnsignedEnum(Enum): | |||
|
|||
|
|||
class LayoutTestCase(FHDLTestCase): | |||
def compare_field(self, field, expected): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def compare_field(self, field, expected): | |
def assertFieldEqual(self, field, expected): |
f432fe4
to
7243fe2
Compare
Updated to address review comments |
Could you add a test that checks for the bug you're fixing here, i.e. the Enum decoder functionality? |
421b70a
to
7d7833e
Compare
Added a test for the enum decoder in |
Don't save the result of Shape.cast in the Layout constructor. This allows the original user-provided shape to be preserved, while still checking its validity. This fixes Enum decoder inference for Signals (amaranth-lang#393).
7d7833e
to
72a80fc
Compare
Thank you for your contribution! |
Don't save the result of Shape.cast in the Layout constructor.
This allows the original user-provided shape to be preserved,
while still checking its validity.
This fixes Enum decoder inference for Signals (#393).