@@ -251,60 +251,6 @@ TEST_CASE("c++ exceptions emergency pool", "[cxx] [exceptions] [ignore] [leaks="
251
251
#endif
252
252
}
253
253
254
-
255
- #define TIMEOUT 19
256
-
257
- #define RECURSION 19
258
-
259
- static esp_timer_handle_t crash_timer;
260
-
261
- static uint32_t result = 0 ;
262
-
263
- uint32_t calc_fac (uint32_t n) {
264
- if (n == 1 || n == 0 ) {
265
- return 1 ;
266
- } else {
267
- return n * calc_fac (n - 1 );
268
- }
269
- }
270
-
271
- static void timer_cb (void *arg) {
272
- result = calc_fac (RECURSION);
273
- }
274
-
275
- // TODO: Not a unit test, refactor to integration test/system test, etc.
276
- TEST_CASE (" frequent interrupts don't interfere with c++ exceptions" , " [cxx] [exceptions] [leaks=" LEAKS " ]" )
277
- {// if exception workaround is disabled, this is almost guaranteed to fail
278
- const esp_timer_create_args_t timer_args {
279
- timer_cb,
280
- NULL ,
281
- ESP_TIMER_TASK,
282
- " crash_timer"
283
- };
284
-
285
- TEST_ESP_OK (esp_timer_create (&timer_args, &crash_timer));
286
- TEST_ESP_OK (esp_timer_start_periodic (crash_timer, TIMEOUT));
287
-
288
- for (int i = 0 ; i < 500 ; i++) {
289
- bool thrown_value = false ;
290
- try {
291
- throw true ;
292
- } catch (bool e) {
293
- thrown_value = e;
294
- }
295
-
296
- if (thrown_value) {
297
- printf (" ex thrown %d\n " , i);
298
- } else {
299
- printf (" ex not thrown\n " );
300
- TEST_ASSERT (false );
301
- }
302
- }
303
-
304
- TEST_ESP_OK (esp_timer_stop (crash_timer));
305
- TEST_ESP_OK (esp_timer_delete (crash_timer));
306
- }
307
-
308
254
#else // !CONFIG_COMPILER_CXX_EXCEPTIONS
309
255
310
256
TEST_CASE (" std::out_of_range exception when -fno-exceptions" , " [cxx][reset=abort,SW_CPU_RESET]" )
0 commit comments