Skip to content

Commit

Permalink
Added tests for AllowBlackbox.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Feb 25, 2025
1 parent dba2543 commit 8887288
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/unit/Instantiate.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,22 @@ def test_IeeeLibrary(self) -> None:

self.assertSetEqual(set(design.IterateDesignUnits()), set(ieeeLibrary.IterateDesignUnits()))

stdLogic = ieeeLibrary.Packages["std_logic_1164"]
self.assertFalse(design.AllowBlackbox)
self.assertFalse(ieeeLibrary.AllowBlackbox)
self.assertFalse(stdLogic.AllowBlackbox)

ieeeLibrary.AllowBlackbox = True
self.assertFalse(design.AllowBlackbox)
self.assertTrue(ieeeLibrary.AllowBlackbox)
self.assertTrue(stdLogic.AllowBlackbox)

ieeeLibrary.AllowBlackbox = None
stdLogic.AllowBlackbox = True
self.assertFalse(design.AllowBlackbox)
self.assertFalse(ieeeLibrary.AllowBlackbox)
self.assertTrue(stdLogic.AllowBlackbox)

def test_IeeeMentorGraphicsLibrary(self) -> None:
design = Design()
ieeeLibrary = design.LoadIEEELibrary(IEEEFlavor.MentorGraphics)
Expand Down

0 comments on commit 8887288

Please sign in to comment.