How to assert that execution path is not executed more than once in Java? -
I am making a assumption that code path is executed only once inside JVM. However, while typing complex, multi-threaded systems sometimes the assumption may be wrong.
Is there a liner claim that I can use it to claim. Some but This is similar to how it can be written, but I'm looking for something in the output code. See the jako code coverage tool. It has the ability to see code paths and it calculates how many times they are executed. It is not easy to install, but what you should do for it. assertAtMostTimes (1, "must not be executed more than once") like guava's
preconditions.checkState (expr) .
Comments
Post a Comment