@Param support for enum

Aleksey Shipilev aleksey.shipilev at oracle.com
Wed May 28 19:59:35 UTC 2014


On 05/28/2014 11:54 PM, Joe Kearney wrote:
> I started by copying the org.openjdk.jmh.ct.valid.EnumTest and removing
> the value on the @Param, but the test didn't fail as I was expecting.
> I'll dig around the tests a little more to understand what they're
> doing, hoping to get some time on this over the next few days.

org.openjdk.jmh.ct.* are compile-time tests. As of now, removing the
argument from @Param would not fail in compile time, but will fail in
runtime if parameter value is not specified.

Runtime tests are in jmh-core-it, and org.openjdk.jmh.it.params.* tests
are what you are looking for, although there is no runtime failure test,
which you probably want to add for non-enum arguments.

-Aleksey.



More information about the jmh-dev mailing list