Skip to content

Commit

Permalink
Correct debug print
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
  • Loading branch information
mballance committed Jul 1, 2020
1 parent cb2cb37 commit 9b268db
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/vsc/model/field_const_array_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def __init__(self, name, data):
# Create fields to match
for v in data:
f = self.add_field()
print("set_value: " + str(v))
f.set_val(v)
self.size.set_val(len(data))

Expand Down
22 changes: 22 additions & 0 deletions ve/unit/test_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,29 @@ def ab_c(self):
it.a in vsc.rangelist(0, 1, 2, 3)

self.assertTrue(v.a in [0,1,2,3])

def test_in_list_testcase(self):
@vsc.randobj
class my_s(object):

def __init__(self):
super().__init__()
self.a = vsc.rand_bit_t(8)
self.b = vsc.rand_bit_t(8)
self.temp = [1,2,3,4,5,6,7,8,9]

@vsc.constraint
def ab_c(self):
self.a in vsc.rangelist(1, 2, (4,8))
self.b in vsc.rangelist(self.temp)

v = my_s()

for i in range(10):
v.randomize()
print("a=" + str(v.a) + " b=" + str(v.b))


def test_in_indep(self):

class obj(object):
Expand Down

0 comments on commit 9b268db

Please sign in to comment.