+
Point of view
All features
deferred class MOCK_EXPECT
Summary
Tag type used by the mock framework
Direct parents
Insert list: EIFFELTEST_TOOLS
Class invariant
Overview
Features
{}
  • target: MOCK_TYPED_OBJECT[MOCK_EXPECT]
Action when an assert fails
{ANY}
Mock features
{ANY}
assert methods used by tests
{ANY}
timer features
{}
{}
{EIFFELTEST_TOOLS}
{}
target: MOCK_TYPED_OBJECT[MOCK_EXPECT]
deferred function
{}
effective procedure
{ANY}
require
  • what_to_do /= Void
ensure
scenario: MOCK_SCENARIO
writable attribute
{ANY}
assert (test: BOOLEAN)
effective procedure
{ANY}
Check that test is actually True.
If test is True, nothing happens except that the assert_counter is incremented by one. When test is False, an error message is printed on std_output; a breakpoint allow you to find out what is going wrong (assuming you are using the -sedb debugger); and the program exits with a non-zero status.
Note: you may change that default behaviour by calling when_test_fails.
label_assert (label: ABSTRACT_STRING, test: BOOLEAN)
effective procedure
{ANY}
Check that test is actually True.
If test is True, nothing happens except that the assert_counter is incremented by one. When test is False, the label is printed on std_output; a breakpoint allow you to find out what is going wrong (assuming you are using the -sedb debugger); and the program exits with a non-zero status.
Note: you may change that default behaviour by calling when_test_fails.
require
  • not test implies label /= Void
message_assert (message_generator: FUNCTION[TUPLE, ABSTRACT_STRING], test: BOOLEAN)
effective procedure
{ANY}
Check that test is actually True.
If test is True, nothing happens except that the assert_counter is incremented by one. When test is False, the generated message is printed on std_output; a breakpoint allow you to find out what is going wrong (assuming you are using the -sedb debugger); and the program exits with a non-zero status.
Note: you may change that default behaviour by calling when_test_fails.
require
  • not test implies message_generator /= Void
start_timer: MICROSECOND_TIME
effective function
{}
stop_timer (start: MICROSECOND_TIME)
effective procedure
{}
timed (action: PROCEDURE[TUPLE])
effective procedure
{}
assert_counter: COUNTER
once function
{}
Unique once COUNTER used to count assert calls.
assertion_flag: STRING
effective function
{}
assertion_level: INTEGER_32
writable attribute
{}
assertion_level_none: INTEGER_32
is 0
constant attribute
{}
assertion_level_require: INTEGER_32
is 1
constant attribute
{}
assertion_level_ensure: INTEGER_32
is 2
constant attribute
{}
assertion_level_class_invariant: INTEGER_32
is 3
constant attribute
{}
assertion_level_loop_invariant: INTEGER_32
is 4
constant attribute
{}
assertion_level_check: INTEGER_32
is 5
constant attribute
{}
set_require: BOOLEAN
effective function
{}
set_loop_invariant: BOOLEAN
effective function
{}
set_check: BOOLEAN
effective function
{}
set_ensure: BOOLEAN
effective function
{}
set_class_invariant: BOOLEAN
effective function
{}
probe_assertion_level
effective procedure
require ensure
default_test_failed (id: INTEGER_32, lbl: ABSTRACT_STRING, gen: ABSTRACT_STRING, ass_flag: ABSTRACT_STRING)
effective procedure
{}
require
  • lbl /= Void
  • gen /= Void
  • ass_flag /= Void
counter_to_message: FUNCTION[TUPLE, ABSTRACT_STRING]
once function
{}
count_to_message: ABSTRACT_STRING
effective function
{}
label_to_message (label: ABSTRACT_STRING): ABSTRACT_STRING
effective function
{}
require
  • label /= Void
ensure
  • Result = label