nhatminhle / cofoja

Contracts for Java
GNU Lesser General Public License v3.0
151 stars 18 forks source link

@Ensures and @Requires are not validated. #56

Open kuechererSWE opened 1 year ago

kuechererSWE commented 1 year ago

I'm running your cofoja example Stack and ArrayListStack . However, the tests fail because the annotations are not evaluated during runtime. The .contract files are along with the bytecode (.class) files in the same directory. During execution I use the JVM switch -javaagent:cofoja.contracts.asm-1.3-20160207.jar

The setting is latest release (cofoja.contracts.asm-1.3-20160207.jar), Eclipse 2022-06 (4.24.0) and JRE.1.8.0_201 and JUnit 5. The tests are failing since no PostconditionError is thrown. E.g. testEmptyPop (java.lang.IndexOutOfBoundsException insted of PreconditionError.