@@ -356,14 +356,14 @@ void test_emits(Tree const& t, id_type id, std::string const& expected, std::str
356356 {
357357 EmitOptions optsd = opts;
358358 optsd = optsd.max_depth (0 );
359- ExpectError::check_error_basic (&t, [&]{ return emit2buf ([&](substr buf){ return emit_yaml (t, id, optsd, buf); }); });
360- ExpectError::check_error_basic (&t, [&]{ return emit2buf ([&](substr buf){ return emit_json (t, id, optsd, buf); }); });
361- ExpectError::check_error_basic (&t, [&]{ return emit2file ([&](FILE *f){ return emit_yaml (t, id, optsd, f); }); });
362- ExpectError::check_error_basic (&t, [&]{ return emit2file ([&](FILE *f){ return emit_json (t, id, optsd, f); }); });
363- ExpectError::check_error_basic (&t, [&]{ return emit2stream ([&](std::ostringstream &oss){ oss << as_yaml (t, id, optsd); }); });
364- ExpectError::check_error_basic (&t, [&]{ return emit2stream ([&](std::ostringstream &oss){ oss << as_json (t, id, optsd); }); });
365- ExpectError::check_error_basic (&t, [&]{ return emitrs_yaml<std::string>(t, id, optsd); });
366- ExpectError::check_error_basic (&t, [&]{ return emitrs_json<std::string>(t, id, optsd); });
359+ ExpectError::check_error_visit (&t, [&]{ return emit2buf ([&](substr buf){ return emit_yaml (t, id, optsd, buf); }); });
360+ ExpectError::check_error_visit (&t, [&]{ return emit2buf ([&](substr buf){ return emit_json (t, id, optsd, buf); }); });
361+ ExpectError::check_error_visit (&t, [&]{ return emit2file ([&](FILE *f){ return emit_yaml (t, id, optsd, f); }); });
362+ ExpectError::check_error_visit (&t, [&]{ return emit2file ([&](FILE *f){ return emit_json (t, id, optsd, f); }); });
363+ ExpectError::check_error_visit (&t, [&]{ return emit2stream ([&](std::ostringstream &oss){ oss << as_yaml (t, id, optsd); }); });
364+ ExpectError::check_error_visit (&t, [&]{ return emit2stream ([&](std::ostringstream &oss){ oss << as_json (t, id, optsd); }); });
365+ ExpectError::check_error_visit (&t, [&]{ return emitrs_yaml<std::string>(t, id, optsd); });
366+ ExpectError::check_error_visit (&t, [&]{ return emitrs_json<std::string>(t, id, optsd); });
367367 }
368368}
369369
@@ -414,14 +414,14 @@ void test_emits(Tree const& t, std::string const& expected, std::string const& e
414414 {
415415 EmitOptions optsd = opts;
416416 optsd = optsd.max_depth (0 );
417- ExpectError::check_error_basic (&t, [&]{ return emit2buf ([&](substr buf){ return emit_yaml (t, optsd, buf); }); });
418- ExpectError::check_error_basic (&t, [&]{ return emit2buf ([&](substr buf){ return emit_json (t, optsd, buf); }); });
419- ExpectError::check_error_basic (&t, [&]{ return emit2file ([&](FILE *f){ return emit_yaml (t, optsd, f); }); });
420- ExpectError::check_error_basic (&t, [&]{ return emit2file ([&](FILE *f){ return emit_json (t, optsd, f); }); });
421- ExpectError::check_error_basic (&t, [&]{ return emit2stream ([&](std::ostringstream &oss){ oss << as_yaml (ConstNodeRef (&t), optsd); }); });
422- ExpectError::check_error_basic (&t, [&]{ return emit2stream ([&](std::ostringstream &oss){ oss << as_json (ConstNodeRef (&t), optsd); }); });
423- ExpectError::check_error_basic (&t, [&]{ return emitrs_yaml<std::string>(t, optsd); });
424- ExpectError::check_error_basic (&t, [&]{ return emitrs_json<std::string>(t, optsd); });
417+ ExpectError::check_error_visit (&t, [&]{ return emit2buf ([&](substr buf){ return emit_yaml (t, optsd, buf); }); });
418+ ExpectError::check_error_visit (&t, [&]{ return emit2buf ([&](substr buf){ return emit_json (t, optsd, buf); }); });
419+ ExpectError::check_error_visit (&t, [&]{ return emit2file ([&](FILE *f){ return emit_yaml (t, optsd, f); }); });
420+ ExpectError::check_error_visit (&t, [&]{ return emit2file ([&](FILE *f){ return emit_json (t, optsd, f); }); });
421+ ExpectError::check_error_visit (&t, [&]{ return emit2stream ([&](std::ostringstream &oss){ oss << as_yaml (ConstNodeRef (&t), optsd); }); });
422+ ExpectError::check_error_visit (&t, [&]{ return emit2stream ([&](std::ostringstream &oss){ oss << as_json (ConstNodeRef (&t), optsd); }); });
423+ ExpectError::check_error_visit (&t, [&]{ return emitrs_yaml<std::string>(t, optsd); });
424+ ExpectError::check_error_visit (&t, [&]{ return emitrs_json<std::string>(t, optsd); });
425425 }
426426}
427427
@@ -471,14 +471,14 @@ void test_emits(ConstNodeRef n, std::string const& expected, std::string const&
471471 {
472472 EmitOptions optsd = opts;
473473 optsd = optsd.max_depth (0 );
474- ExpectError::check_error_basic (n.tree (), [&]{ return emit2buf ([&](substr buf){ return emit_yaml (n, optsd, buf); }); });
475- ExpectError::check_error_basic (n.tree (), [&]{ return emit2buf ([&](substr buf){ return emit_json (n, optsd, buf); }); });
476- ExpectError::check_error_basic (n.tree (), [&]{ return emit2file ([&](FILE *f){ return emit_yaml (n, optsd, f); }); });
477- ExpectError::check_error_basic (n.tree (), [&]{ return emit2file ([&](FILE *f){ return emit_json (n, optsd, f); }); });
478- ExpectError::check_error_basic (n.tree (), [&]{ return emit2stream ([&](std::ostringstream &oss){ oss << as_yaml (n, optsd); }); });
479- ExpectError::check_error_basic (n.tree (), [&]{ return emit2stream ([&](std::ostringstream &oss){ oss << as_json (n, optsd); }); });
480- ExpectError::check_error_basic (n.tree (), [&]{ return emitrs_yaml<std::string>(n, optsd); });
481- ExpectError::check_error_basic (n.tree (), [&]{ return emitrs_json<std::string>(n, optsd); });
474+ ExpectError::check_error_visit (n.tree (), [&]{ return emit2buf ([&](substr buf){ return emit_yaml (n, optsd, buf); }); });
475+ ExpectError::check_error_visit (n.tree (), [&]{ return emit2buf ([&](substr buf){ return emit_json (n, optsd, buf); }); });
476+ ExpectError::check_error_visit (n.tree (), [&]{ return emit2file ([&](FILE *f){ return emit_yaml (n, optsd, f); }); });
477+ ExpectError::check_error_visit (n.tree (), [&]{ return emit2file ([&](FILE *f){ return emit_json (n, optsd, f); }); });
478+ ExpectError::check_error_visit (n.tree (), [&]{ return emit2stream ([&](std::ostringstream &oss){ oss << as_yaml (n, optsd); }); });
479+ ExpectError::check_error_visit (n.tree (), [&]{ return emit2stream ([&](std::ostringstream &oss){ oss << as_json (n, optsd); }); });
480+ ExpectError::check_error_visit (n.tree (), [&]{ return emitrs_yaml<std::string>(n, optsd); });
481+ ExpectError::check_error_visit (n.tree (), [&]{ return emitrs_json<std::string>(n, optsd); });
482482 }
483483 }
484484}
0 commit comments