Bool companion object that provides factory methods to create different sub types of Bool
Bool is used by code generated from BooleanMacro (which AssertionsMacro and RequirementsMacro uses), it needs to be public so that the generated code can be compiled. It is expected that ScalaTest users would ever need to use Bool directly.
Attributes
- Companion
- trait
- Source
- Bool.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Bool.type
Members list
Value members
Concrete methods
Create binary macro Bool that is used by BooleanMacro to wrap a recognized Boolean expression, which includes Boolean expression that uses ==, ===, !=, !==, >, >=, <, <=, &&, &, || and |.
Create binary macro Bool that is used by BooleanMacro to wrap a recognized Boolean expression, which includes Boolean expression that uses ==, ===, !=, !==, >, >=, <, <=, &&, &, || and |.
Value parameters
- expression
-
the
Booleanexpression - left
-
the left-hand-side (LHS) of the
Booleanexpression - operator
-
the operator (method name) of the
Booleanexpression - prettifier
-
the
Prettifierused for prettifying messages, this need to be implicit to let the compiler resolve it implicitly, it will be too tricky for our macro to resolve it and pass it over explicitly. - right
-
the right-hand-side (RHS) of the
Booleanexpression
Attributes
- Returns
-
a binary macro
Bool - Source
- Bool.scala
Overloaded method that takes a Bool in place of Boolean expression to create a new binary macro Bool.
Overloaded method that takes a Bool in place of Boolean expression to create a new binary macro Bool.
Value parameters
- bool
-
the
Boolthat will provide theBooleanexpression value withbool.value - left
-
the left-hand-side (LHS) of the
Booleanexpression - operator
-
the operator (method name) of the
Booleanexpression - prettifier
-
the
Prettifierused for prettifying messages, this need to be implicit to let the compiler resolve it implicitly, it will be too tricky for our macro to resolve it and pass it over explicitly. - right
-
the right-hand-side (RHS) of the
Booleanexpression
Attributes
- Returns
-
a binary macro
Bool - Source
- Bool.scala
Create exists macro Bool that is used by BooleanMacro to wrap a recognized Boolean expression represented by exists method call.
Create exists macro Bool that is used by BooleanMacro to wrap a recognized Boolean expression represented by exists method call.
Value parameters
- expression
-
the
Booleanexpression - left
-
the left-hand-side (LHS) of the
Booleanexpression - prettifier
-
the
Prettifierused for prettifying messages, this need to be implicit to let the compiler resolve it implicitly, it will be too tricky for our macro to resolve it and pass it over explicitly. - right
-
the right-hand-side (RHS) of the
Booleanexpression
Attributes
- Returns
-
a exists macro
Bool - Source
- Bool.scala
Create macro Bool that is used by BooleanMacro to wrap a recognized Boolean expression represented by a isInstanceOf method call,
Create macro Bool that is used by BooleanMacro to wrap a recognized Boolean expression represented by a isInstanceOf method call,
Value parameters
- className
-
the class name passed to
isInstanceOfmethod call - expression
-
the
Booleanexpression - left
-
the left-hand-side (LHS) of the
Booleanexpression - operator
-
the operator (method name) of the
Booleanexpression - prettifier
-
the
Prettifierused for prettifying messages, this need to be implicit to let the compiler resolve it implicitly, it will be too tricky for our macro to resolve it and pass it over explicitly.
Attributes
- Returns
-
a
Boolinstance that represents aisInstanceOfmethod call - Source
- Bool.scala
Overloaded method that takes a Bool in place of Boolean expression to create a new isInstanceOf macro Bool.
Overloaded method that takes a Bool in place of Boolean expression to create a new isInstanceOf macro Bool.
Value parameters
- bool
-
the
Boolthat will provide theBooleanexpression value withbool.value - className
-
the class name passed to
isInstanceOfmethod call - left
-
the left-hand-side (LHS) of the
Booleanexpression - operator
-
the operator (method name) of the
Booleanexpression - prettifier
-
the
Prettifierused for prettifying messages, this need to be implicit to let the compiler resolve it implicitly, it will be too tricky for our macro to resolve it and pass it over explicitly.
Attributes
- Returns
-
a
Boolinstance that represents aisInstanceOfmethod call - Source
- Bool.scala
A helper method to check is the given Bool is a simple macro Bool and contains empty expression text.
A helper method to check is the given Bool is a simple macro Bool and contains empty expression text.
Value parameters
- bool
-
the
Boolto check
Attributes
- Returns
-
trueif the givenBoolis a simple macroBooland contains empty expression text,falseotherwise. - Source
- Bool.scala
Create macro Bool that is used by BooleanMacro to wrap a recognized Boolean expression represented by length and size method call,
Create macro Bool that is used by BooleanMacro to wrap a recognized Boolean expression represented by length and size method call,
Value parameters
- actual
-
the actual value returned from
lengthorsizemethod call - expected
-
the expected value returned from
lengthorsizemethod call - left
-
the left-hand-side (LHS) of the
Booleanexpression - operator
-
the operator (method name) of the
Booleanexpression - prettifier
-
the
Prettifierused for prettifying messages, this need to be implicit to let the compiler resolve it implicitly, it will be too tricky for our macro to resolve it and pass it over explicitly.
Attributes
- Returns
-
a
Boolinstance that represents alengthorsizemethod call - Source
- Bool.scala
Create a negated version of the given Bool
Create a negated version of the given Bool
Value parameters
- bool
-
the given
Bool - prettifier
-
the
Prettifierused for prettifying messages, this need to be implicit to let the compiler resolve it implicitly, it will be too tricky for our macro to resolve it and pass it over explicitly.
Attributes
- Returns
-
a negated version of the given
Bool - Source
- Bool.scala
Create simple macro Bool that is used by BooleanMacro to wrap an unrecognized Boolean expression.
Create simple macro Bool that is used by BooleanMacro to wrap an unrecognized Boolean expression.
Value parameters
- expression
-
the
Booleanexpression - expressionText
-
the original expression text (source code)
- prettifier
-
the
Prettifierused for prettifying messages, this need to be implicit to let the compiler resolve it implicitly, it will be too tricky for our macro to resolve it and pass it over explicitly.
Attributes
- Returns
-
a simple macro
Bool - Source
- Bool.scala
Create unary macro Bool that is used by BooleanMacro to wrap a recognized Boolean expression represented by a unary method call, which includes Boolean expression that uses isEmpty.
Create unary macro Bool that is used by BooleanMacro to wrap a recognized Boolean expression represented by a unary method call, which includes Boolean expression that uses isEmpty.
Value parameters
- expression
-
the
Booleanexpression - left
-
the left-hand-side (LHS) of the
Booleanexpression - operator
-
the operator (method name) of the
Booleanexpression - prettifier
-
the
Prettifierused for prettifying messages, this need to be implicit to let the compiler resolve it implicitly, it will be too tricky for our macro to resolve it and pass it over explicitly.
Attributes
- Returns
-
a unary macro
Bool - Source
- Bool.scala
Overloaded method that takes a Bool in place of Boolean expression to create a new unary macro Bool.
Overloaded method that takes a Bool in place of Boolean expression to create a new unary macro Bool.
Value parameters
- bool
-
the
Boolthat will provide theBooleanexpression value withbool.value - left
-
the left-hand-side (LHS) of the
Booleanexpression - operator
-
the operator (method name) of the
Booleanexpression - prettifier
-
the
Prettifierused for prettifying messages, this need to be implicit to let the compiler resolve it implicitly, it will be too tricky for our macro to resolve it and pass it over explicitly.
Attributes
- Returns
-
a binary macro
Bool - Source
- Bool.scala