Currently, TESTed-DSL treats expression and statements as synonyms. However, we might make the following distinction.
Expressions are evaluated into a value. The default expected return value of an expression is nothing, but this expected value can be altered by explicitly setting an expected return value in a test suite.
Statements are executed, which never yields a value. The return value of an expression is always ignored, and this behavior can not be overruled. This means that no return value can be set for a statement in a test suite.
Currently, TESTed-DSL treats
expression
andstatements
as synonyms. However, we might make the following distinction.Expressions are evaluated into a value. The default expected
return
value of anexpression
isnothing
, but this expected value can be altered by explicitly setting an expectedreturn
value in a test suite.Statements are executed, which never yields a value. The
return
value of an expression is always ignored, and this behavior can not be overruled. This means that noreturn
value can be set for astatement
in a test suite.