def test_component_double_star_args_ungroup(): kwargs = {'foo': Bits4(0), 'bar': Bits16(42)} case = CaseComponentArgsComp run_test(case, case.DUT(**kwargs))
def test_component_double_star_args(): kwargs = {'foo': Bits4(0), 'bar': Bits16(42)} case = CaseDoubleStarArgComp with expected_failure(RTLIRConversionError, "keyword args are not allowed"): run_test(case, case.DUT(**kwargs))
def test_component_star_args(): args = [Bits4(0), Bits16(42)] case = CaseStarArgComp with expected_failure(RTLIRConversionError, "varargs are not allowed"): run_test(case, case.DUT(*args))
def test_component_star_args_ungroup(): args = [Bits4(0), Bits16(42)] case = CaseComponentArgsComp run_test(case, case.DUT(*args))
decl_wires = tr.structural.decl_wires[m] assert decl_wires == case.REF_WIRE decl_consts = tr.structural.decl_consts[m] assert decl_consts == case.REF_CONST connections = tr.structural.connections[m] assert connections == case.REF_CONN vector_types = tr.structural.decl_type_vector assert list(vector_types.items()) == case.REF_VECTOR except AttributeError: pass def test_component_args(): case = CaseComponentArgsComp run_test(case, case.DUT(Bits4(0), Bits16(42))) def test_component_default_args(): case = CaseComponentDefaultArgsComp run_test(case, case.DUT(Bits4(0))) def test_component_kw_args(): case = CaseComponentArgsComp run_test(case, case.DUT(foo=Bits4(0), bar=Bits16(42))) def test_component_star_args(): args = [Bits4(0), Bits16(42)] case = CaseStarArgComp