:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/stag-toolkit/sphinx/gen/gdscript/StagTest.SignalExpector.xml. .. _class_StagTest_SignalExpector: StagTest.SignalExpector ======================= **Inherits:** ``RefCounted`` Testing class for signal expectors. This class is thread-safe. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +------------+----------------------------------------------------------------------------+---------------+ | ``Signal`` | :ref:`_emitter` | | +------------+----------------------------------------------------------------------------+---------------+ | ``String`` | :ref:`_emitter_name` | ``""`` | +------------+----------------------------------------------------------------------------+---------------+ | ``int`` | :ref:`_count` | ``0`` | +------------+----------------------------------------------------------------------------+---------------+ | ``String`` | :ref:`_context` | ``""`` | +------------+----------------------------------------------------------------------------+---------------+ | ``Mutex`` | :ref:`_mutex` | ```` | +------------+----------------------------------------------------------------------------+---------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_increment`\ (\ ...\ ) |vararg| | +---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`assert_valid`\ (\ extra_context\: ``String`` = ""\ ) | +---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`assert_emitted`\ (\ extra_context\: ``String`` = ""\ ) | +---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`assert_not_emitted`\ (\ extra_context\: ``String`` = ""\ ) | +---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`assert_count`\ (\ exact_call_count\: ``int``, extra_context\: ``String`` = ""\ ) | +---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`block_until`\ (\ threshold\: ``int`` = 1, timeout_ms\: ``int`` = 30000, extra_context\: ``String`` = ""\ ) | +---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`reset`\ (\ ) | +---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``int`` | :ref:`get_count`\ (\ ) | +---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_StagTest_SignalExpector_property__emitter: .. rst-class:: classref-property ``Signal`` **_emitter** :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_SignalExpector_property__emitter_name: .. rst-class:: classref-property ``String`` **_emitter_name** = ``""`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_SignalExpector_property__count: .. rst-class:: classref-property ``int`` **_count** = ``0`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_SignalExpector_property__context: .. rst-class:: classref-property ``String`` **_context** = ``""`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_SignalExpector_property__mutex: .. rst-class:: classref-property ``Mutex`` **_mutex** = ```` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_StagTest_SignalExpector_private_method__increment: .. rst-class:: classref-method |void| **_increment**\ (\ ...\ ) |vararg| :ref:`🔗` Increments the emitter count by 1. .. rst-class:: classref-item-separator ---- .. _class_StagTest_SignalExpector_method_assert_valid: .. rst-class:: classref-method |void| **assert_valid**\ (\ extra_context\: ``String`` = ""\ ) :ref:`🔗` Asserts that the emitter is not null. .. rst-class:: classref-item-separator ---- .. _class_StagTest_SignalExpector_method_assert_emitted: .. rst-class:: classref-method |void| **assert_emitted**\ (\ extra_context\: ``String`` = ""\ ) :ref:`🔗` Asserts that the Signal was emitted at least once. .. rst-class:: classref-item-separator ---- .. _class_StagTest_SignalExpector_method_assert_not_emitted: .. rst-class:: classref-method |void| **assert_not_emitted**\ (\ extra_context\: ``String`` = ""\ ) :ref:`🔗` Asserts that the Signal was not emitted at all. .. rst-class:: classref-item-separator ---- .. _class_StagTest_SignalExpector_method_assert_count: .. rst-class:: classref-method |void| **assert_count**\ (\ exact_call_count\: ``int``, extra_context\: ``String`` = ""\ ) :ref:`🔗` Asserts that the Signal was emitted exactly `exact_call_count` times. .. rst-class:: classref-item-separator ---- .. _class_StagTest_SignalExpector_method_block_until: .. rst-class:: classref-method |void| **block_until**\ (\ threshold\: ``int`` = 1, timeout_ms\: ``int`` = 30000, extra_context\: ``String`` = ""\ ) :ref:`🔗` Blocks until either the emitter count or timeout (in milliseconds) is reached. Fails the test if the timeout was reached. .. rst-class:: classref-item-separator ---- .. _class_StagTest_SignalExpector_method_reset: .. rst-class:: classref-method |void| **reset**\ (\ ) :ref:`🔗` Resets the expector state. .. rst-class:: classref-item-separator ---- .. _class_StagTest_SignalExpector_method_get_count: .. rst-class:: classref-method ``int`` **get_count**\ (\ ) :ref:`🔗` Returns the number of times the signal emitted. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`