Skip to content

Commit

Permalink
Improved test coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Dec 27, 2020
1 parent 2698a5f commit 74732d8
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion tests/unit/Instantiate.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
from pathlib import Path
from unittest import TestCase

from pyVHDLModel.VHDLModel import Design, Library, Document, Entity
from pyVHDLModel.VHDLModel import Design, Library, Document, Entity, Architecture, PackageBody, Package, Configuration, Context


if __name__ == "__main__":
print("ERROR: you called a testcase declaration file as an executable module.")
print("Use: 'python -m unitest <testcase module>'")
exit(1)


class Instantiate(TestCase):
def test_Design(self):
design = Design()

self.assertIsNotNone(design)
self.assertTrue(len(design.Documents) == 0)
self.assertTrue(len(design.Libraries) == 0)

def test_Library(self):
library = Library()

Expand All @@ -22,3 +27,18 @@ def test_Document(self):

def test_Entity(self):
entity = Entity("entity_1")

def test_Architecture(self):
architecture = Architecture("arch_1")

def test_Package(self):
package = Package("pack_1")

def test_PackageBody(self):
packageBody = PackageBody("pack_1")

def test_Context(self):
packageBody = Context("ctx_1")

def test_Configuration(self):
packageBody = Configuration("conf_1")

0 comments on commit 74732d8

Please sign in to comment.