Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
io.flutter.util.PreconditionsTest Class Reference

Public Member Functions

void checkNotNull_notNull ()
 
void checkNotNull_Null ()
 

Detailed Description

Definition at line 17 of file PreconditionsTest.java.

Member Function Documentation

◆ checkNotNull_notNull()

void io.flutter.util.PreconditionsTest.checkNotNull_notNull ( )
inline

Definition at line 19 of file PreconditionsTest.java.

19 {
20 // Should always return its input.
21 assertEquals("non-null", Preconditions.checkNotNull("non-null"));
22 assertEquals(42, (int) Preconditions.checkNotNull(42));
23 Object classParam = new Object();
24 assertEquals(classParam, Preconditions.checkNotNull(classParam));
25 }

◆ checkNotNull_Null()

void io.flutter.util.PreconditionsTest.checkNotNull_Null ( )
inline

Definition at line 28 of file PreconditionsTest.java.

28 {
29 assertThrows(
30 NullPointerException.class,
31 () -> {
32 Preconditions.checkNotNull(null);
33 });
34 }

The documentation for this class was generated from the following file: