def test_TmcFile_isolate_DataTypes(generic_tmc_path): tmc = TmcFile(generic_tmc_path) tmc.isolate_DataTypes() assert "iterator" in tmc.all_DataTypes assert "VERSION" in tmc.all_DataTypes assert len(tmc.all_DataTypes) == 11
def test_TmcFile_resolve_enums(generic_tmc_path): tmc = TmcFile(generic_tmc_path) tmc.isolate_Symbols() tmc.isolate_DataTypes() assert not tmc.all_Symbols['MAIN.dtype_samples_enum'].is_enum assert not tmc.all_SubItems['DUT_CONTAINER']['dtype_enum'].is_enum tmc.resolve_enums() assert tmc.all_Symbols['MAIN.dtype_samples_enum'].is_enum assert tmc.all_SubItems['DUT_CONTAINER']['dtype_enum'].is_enum
def test_TmcFile_isolate_SubItems(generic_tmc_path): tmc = TmcFile(generic_tmc_path) tmc.isolate_DataTypes(process_subitems=False) tmc.isolate_SubItems('iterator') assert 'increment' in tmc.all_SubItems['iterator'] assert 'out' in tmc.all_SubItems['iterator'] assert 'value' in tmc.all_SubItems['iterator'] assert 'lim' in tmc.all_SubItems['iterator'] assert 'extra1' in tmc.all_SubItems['iterator'] assert 'extra2' in tmc.all_SubItems['iterator'] assert len(tmc.all_SubItems['iterator']) == 6