def METHOD_NAME(self):
    with self.assertRaisesRegex(TypeError,
            r"^Memory width must be a non-negative integer, not -1$"):
        m = Memory(width=-1, depth=4)
    with self.assertRaisesRegex(TypeError,
            r"^Memory depth must be a non-negative integer, not -1$"):
        m = Memory(width=8, depth=-1)