# Class CompilationSubject.DiagnosticOnLine

java.lang.Object
com.google.testing.compile.CompilationSubject.DiagnosticOnLine

Enclosing class:
  `CompilationSubject`

public final class CompilationSubject.DiagnosticOnLine extends Object
Assertions that a note, warning, or error was found on a given line.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`failExpectingMatchingDiagnostic(String format, Object... args)`
`CompilationSubject.DiagnosticAtColumn`
`onLine(long expectedLine)`
Asserts that the note, warning, or error was found on a given line.
`void`
`onLineContaining(String expectedLineSubstring)`
Asserts that the note, warning, or error was found on the single line that contains a substring.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### onLine

@CanIgnoreReturnValue public CompilationSubject.DiagnosticAtColumn onLine(long expectedLine)
Asserts that the note, warning, or error was found on a given line.

### onLineContaining

public void onLineContaining(String expectedLineSubstring)
Asserts that the note, warning, or error was found on the single line that contains a substring.

### failExpectingMatchingDiagnostic

protected void failExpectingMatchingDiagnostic(String format, Object... args)