TypeMatcherHelper

TypeMatcherHelper is called by TypeMatcherMacro to support a [Type] and an [Type] syntax.

This object needs to be public so that the macro-generated code can be compiled. It is expected that ScalaTest users would ever need to use TypeMatcherHelper directly.

class Object
trait Matchable
class Any

Value members

Concrete methods

Create a type matcher for the given ResultOfATypeInvocation.

Create a type matcher for the given ResultOfATypeInvocation.

Value parameters:
aType

an instance of ResultOfATypeInvocation

Returns:

a type Matcher

Create a type matcher for the given ResultOfAnTypeInvocation.

Create a type matcher for the given ResultOfAnTypeInvocation.

Value parameters:
anType

an instance of ResultOfAnTypeInvocation

Returns:

a type Matcher

def assertAType(left: Any, aType: ResultOfATypeInvocation[_], prettifier: Prettifier, pos: Position): Assertion

Check if the given left is an instance of the type as described in the given ResultOfATypeInvocation. A TestFailedException will be thrown if left is not an instance of the type given by ResultOfATypeInvocation.

Check if the given left is an instance of the type as described in the given ResultOfATypeInvocation. A TestFailedException will be thrown if left is not an instance of the type given by ResultOfATypeInvocation.

Value parameters:
aType

an instance of ResultOfATypeInvocation

left

the left-hand-side (LHS) to be checked for the type

def assertATypeShouldBeTrue(left: Any, aType: ResultOfATypeInvocation[_], shouldBeTrue: Boolean, prettifier: Prettifier, pos: Position): Assertion

Based on shouldBeTrue value, check if the given left is an instance of the type as described in the given ResultOfATypeInvocation. If shouldBeTrue is true, a TestFailedException will be thrown if left is not an instance of the type given by ResultOfATypeInvocation. If shouldBeTrue is false, a TestFailedException will be thrown if left is an instance of the type given by ResultOfATypeInvocation.

Based on shouldBeTrue value, check if the given left is an instance of the type as described in the given ResultOfATypeInvocation. If shouldBeTrue is true, a TestFailedException will be thrown if left is not an instance of the type given by ResultOfATypeInvocation. If shouldBeTrue is false, a TestFailedException will be thrown if left is an instance of the type given by ResultOfATypeInvocation.

Value parameters:
aType

an instance of ResultOfATypeInvocation

left

the left-hand-side (LHS) to be checked for the type

def assertAnType(left: Any, anType: ResultOfAnTypeInvocation[_], prettifier: Prettifier, pos: Position): Assertion

Check if the given left is an instance of the type as described in the given ResultOfAnTypeInvocation. A TestFailedException will be thrown if left is not an instance of the type given by ResultOfAnTypeInvocation.

Check if the given left is an instance of the type as described in the given ResultOfAnTypeInvocation. A TestFailedException will be thrown if left is not an instance of the type given by ResultOfAnTypeInvocation.

Value parameters:
anType

an instance of ResultOfAnTypeInvocation

left

the left-hand-side (LHS) to be checked for the type

def assertAnTypeShouldBeTrue(left: Any, anType: ResultOfAnTypeInvocation[_], shouldBeTrue: Boolean, prettifier: Prettifier, pos: Position): Assertion

Based on shouldBeTrue value, check if the given left is an instance of the type as described in the given ResultOfAnTypeInvocation. If shouldBeTrue is true, a TestFailedException will be thrown if left is not an instance of the type given by ResultOfAnTypeInvocation. If shouldBeTrue is false, a TestFailedException will be thrown if left is an instance of the type given by ResultOfAnTypeInvocation.

Based on shouldBeTrue value, check if the given left is an instance of the type as described in the given ResultOfAnTypeInvocation. If shouldBeTrue is true, a TestFailedException will be thrown if left is not an instance of the type given by ResultOfAnTypeInvocation. If shouldBeTrue is false, a TestFailedException will be thrown if left is an instance of the type given by ResultOfAnTypeInvocation.

Value parameters:
anType

an instance of ResultOfAnTypeInvocation

left

the left-hand-side (LHS) to be checked for the type

Create a negated type matcher for the given ResultOfATypeInvocation.

Create a negated type matcher for the given ResultOfATypeInvocation.

Value parameters:
aType

an instance of ResultOfATypeInvocation

Returns:

a negated type Matcher

Create a negated type matcher for the given ResultOfAnTypeInvocation.

Create a negated type matcher for the given ResultOfAnTypeInvocation.

Value parameters:
anType

an instance of ResultOfAnTypeInvocation

Returns:

a negated type Matcher