Emma coverage on Enum types

后端 未结 3 1890
滥情空心
滥情空心 2021-02-01 01:34

I\'m running EclEmma, the Emma plugin for Eclipse, and the coverage report shows only partial coverage for an Enum I\'ve defined, even though it shows the only value in the Enum

3条回答
  •  天涯浪人
    2021-02-01 02:09

    What you're seeing is some hidden bytecode being generated due to an enumeration.

    To get rid of this issue, add a call to the values() and valueOf() methods in the enum, as mentioned earlier by Carl Manaster and Peter Lawrey.

提交回复
热议问题