mirror of
https://github.com/espressif/esp-mqtt.git
synced 2026-06-05 21:04:46 +00:00
32df7e27fc
Add support of percent-encoded characters when passing the username and password in URI Closes https://github.com/espressif/esp-mqtt/issues/294
1.6 KiB
1.6 KiB
Host test for utility functions of MQTT client
This is a host test which tests utility functions from mqtt_utils subcomponent.
Usage
To run the test suite you will need to set target to Linux and build the application. You will also need to enable (Top) → Compiler options → Enable C++ run-time type info (RTTI) (CONFIG_COMPILER_CXX_RTTI)
The default sdkconfig should set those options automatically, so usually just the command below will be enough to run it.
idf.py build monitor
Example structure
- main/idf_component.yml adds a dependency on
espressif/catch2component. - main/CMakeLists.txt specifies the source files and registers the
maincomponent withWHOLE_ARCHIVEoption enabled. - CMakeLists.txt includes CPM package manager and adds rapidcheck package
- main/test_main.cpp implements the application entry point which calls the test runner.
- main/test_cases.cpp implements test cases.
- sdkconfig.defaults sets the options required to run the example: enables C++ exceptions, increases the size of the
maintask stack, and enables C++ runtime type info.
Expected output
Randomness seeded to: 2196951535
Using configuration: seed=951423191499285688
- Testing the decoding of random string
OK, passed 100 tests
- Testing the decoding of random URI
OK, passed 100 tests
===============================================================================
All tests passed (403 assertions in 1 test case)
Test passed.