use of net.praqma.jenkins.memorymap.parser.ti.TexasInstrumentsMemoryMapParser in project memory-map-plugin by Praqma.
the class TexasInstrumentsMemoryMapParserIT method testUsageValues.
@Test
public void testUsageValues() throws Exception {
MemoryMapGraphConfiguration graphConfiguration = new MemoryMapGraphConfiguration("RAMM0+RAML0_L3", "432");
TexasInstrumentsMemoryMapParser parser = createParser(graphConfiguration);
parser.setMapFile("TexasInstrumentsMapFile.txt");
parser.setConfigurationFile("28069_RAM_lnk.cmd");
HashMap<String, String> expectedValues = new HashMap<>();
expectedValues.put("RAMM0", "00000195");
expectedValues.put("RAML0_L3", "00001a8f");
TestUtils.testUsageValues(jenkins, parser, "ti.zip", expectedValues);
}
use of net.praqma.jenkins.memorymap.parser.ti.TexasInstrumentsMemoryMapParser in project memory-map-plugin by Praqma.
the class TexasInstrumentsMemoryMapParserTest method testGetDefaultWordSize.
@Test
public void testGetDefaultWordSize() {
TexasInstrumentsMemoryMapParser parser = new TexasInstrumentsMemoryMapParser();
assertEquals("16 equals parser.getDefaultWordSize()", 16, parser.getDefaultWordSize());
}
use of net.praqma.jenkins.memorymap.parser.ti.TexasInstrumentsMemoryMapParser in project memory-map-plugin by Praqma.
the class TexasInstrumentsMemoryMapParserTest method testParseConfigFile.
@Test
public void testParseConfigFile() throws IOException {
TexasInstrumentsMemoryMapParser parser = new TexasInstrumentsMemoryMapParser();
String file = TexasInstrumentsMemoryMapParserTest.class.getResource("28069_RAM_lnk.cmd").getFile();
File f = new File(file);
parser.parseConfigFile(f);
}
use of net.praqma.jenkins.memorymap.parser.ti.TexasInstrumentsMemoryMapParser in project memory-map-plugin by Praqma.
the class TexasInstrumentsMemoryMapParserTest method testParseMapFile.
@Test
public void testParseMapFile() throws IOException {
TexasInstrumentsMemoryMapParser parser = new TexasInstrumentsMemoryMapParser();
String file = TexasInstrumentsMemoryMapParserTest.class.getResource("TexasInstrumentsMapFile.txt").getFile();
File f = new File(file);
MemoryMapConfigMemory configMemory = new MemoryMapConfigMemory();
configMemory.add(new MemoryMapConfigMemoryItem("RAMM0", "00000050", "000003b0", "00000195", "0000021b"));
configMemory = parser.parseMapFile(f, configMemory);
assertTrue(configMemory.size() > 0);
configMemory.stream().filter(item -> item.getName().equals("RAMM0")).forEach(item -> {
assertEquals(item.getUsed(), "00000195");
assertEquals(item.getUnused(), "0000021b");
});
}
use of net.praqma.jenkins.memorymap.parser.ti.TexasInstrumentsMemoryMapParser in project memory-map-plugin by Praqma.
the class MemoryMapParserDelegateTest method findFilePatternWorks_test.
@Test
public void findFilePatternWorks_test() throws IOException {
MemoryMapMapParserDelegate delegate = new MemoryMapMapParserDelegate();
MemoryMapGraphConfiguration gc = new MemoryMapGraphConfiguration(null, null);
gc.setGraphDataList("CODE,DATA,CONST");
gc.setGraphCaption("Config Memory Graph");
List<MemoryMapGraphConfiguration> graphConfig = Collections.singletonList(gc);
AbstractMemoryMapParser parser = new TexasInstrumentsMemoryMapParser("TI", "TexasInstrumentsMapFile.txt", "28069_RAM_lnk.cmd", 16, graphConfig, Boolean.TRUE);
List<AbstractMemoryMapParser> parsers = Collections.singletonList(parser);
delegate.setParsers(parsers);
assertNotNull(delegate.getParsers());
assertNotNull(parser.getMapFile());
File test = new File(file.getAbsolutePath().substring(0, file.getAbsolutePath().lastIndexOf(File.separator)));
assertTrue(test.isDirectory());
try {
delegate.findFile(test, "*.map");
} catch (Exception ex) {
fail("Parser did not find the file" + ex);
}
}
Aggregations