try to fix the jacoco error

This commit is contained in:
hneemann 2018-05-14 22:22:54 +02:00
parent 1f4adbc023
commit a072dbd564
2 changed files with 11 additions and 9 deletions

View File

@ -6,11 +6,11 @@
package de.neemann.digital.core.element;
import de.neemann.digital.analyse.expression.format.FormatToExpression;
import de.neemann.digital.core.IntFormat;
import de.neemann.digital.core.arithmetic.BarrelShifterMode;
import de.neemann.digital.core.arithmetic.LeftRightFormat;
import de.neemann.digital.core.extern.Application;
import de.neemann.digital.core.io.InValue;
import de.neemann.digital.core.IntFormat;
import de.neemann.digital.core.memory.DataField;
import de.neemann.digital.core.memory.rom.ROMManger;
import de.neemann.digital.draw.graphics.Style;
@ -53,7 +53,7 @@ public final class Keys {
/**
* Returns the key of the given name.
* If key does not exist, nul is returned.
* If key does not exist, null is returned.
*
* @param name the name of the key
* @return the key or null
@ -62,6 +62,13 @@ public final class Keys {
return InstanceHolder.INSTANCE.get(name);
}
/**
* @return all available keys
*/
public static Iterable<Key> getKeys() {
return InstanceHolder.INSTANCE.values();
}
private Keys() {
}

View File

@ -25,14 +25,9 @@ public class TestKeyConsistence extends TestCase {
/**
* Checks if key descriptions are complete
*
* @throws NodeException
* @throws PinException
* @throws IllegalAccessException
*/
public void testConsistence() throws NodeException, PinException, IllegalAccessException {
for (Field f : Keys.class.getDeclaredFields()) {
Key key = ((Key) f.get(null));
public void testConsistence() {
for (Key key : Keys.getKeys()) {
checkKey(key.getLangKey());
checkKey(key.getLangKey() + "_tt");