example_test.py 669 B

1234567891011121314151617181920212223
  1. from __future__ import print_function
  2. import ttfw_idf
  3. @ttfw_idf.idf_example_test(env_tag='Example_WIFI')
  4. def test_examples_system_cpp_exceptions(env, extra_data):
  5. dut = env.get_dut('cpp_exceptions_example', 'examples/system/cpp_exceptions')
  6. # start test
  7. dut.start_app()
  8. lines = ['app_main starting',
  9. 'In constructor, arg=42',
  10. 'In constructor, arg=0',
  11. 'In destructor, m_arg=42',
  12. 'Exception caught: Exception in constructor',
  13. 'app_main done'
  14. ]
  15. for line in lines:
  16. dut.expect(line, timeout=2)
  17. if __name__ == '__main__':
  18. test_examples_system_cpp_exceptions()