Module Assertions

A library providing uniform access to various assertion frameworks.

Currently supports org.junit.Assert, junit.framework.*, com.google.common.base.Preconditions, and java.util.Objects.

Import path

semmle.code.java.frameworks.Assertions

Imports

java

Provides all default Java QL imports.

Predicates

assertFail

A trivially failing assertion. That is, assert false or its equivalents.

Classes

AssertFailMethod

A method that unconditionally fails.

AssertFalseMethod

A method that asserts that its argument is false.

AssertNotNullMethod

A method that asserts that its argument is not null.

AssertTrueMethod

A method that asserts that its argument is true.

AssertionMethod

Datatypes