@Test
   public void testNullPointerException() {
      thrown = false;
      IntList list = null;
      IntList sublist = new IntList(null);
      IntList newList = new IntList(2, 2, 4);
      try {
         actual = OrderedIntListUtility.replaceAll(list, sublist, newList);
      } catch(NullPointerException e) {
         thrown = true;
      }
   }


Java代码覆盖率告诉我在此特定测试中缺少一些说明。我不知道这里错过的指示在哪里。请帮忙。谢谢。

最佳答案

从eclemma文档-http://www.eclemma.org/jacoco/trunk/doc/counters.html

Instructions (C0 Coverage) - The smallest unit JaCoCo counts are single Java byte code instructions. Instruction coverage
provides information about the amount of code that has been executed or missed. This metric is
completely independent from source formatting and always available, even in absence of debug
information in the class files.

10-07 13:10