@@ -106,8 +106,8 @@ void Benchmark::runAll()
106106
107107void Benchmark::summarizeToJson (std::ostream& os)
108108{
109- std::string buffer = glz::write_json (results_);
110- os << buffer;
109+ auto buffer = glz::write_json (results_);
110+ os << buffer. value () ;
111111}
112112
113113void Benchmark::summarize (std::ostream& os)
@@ -416,14 +416,14 @@ std::unique_ptr<Test> binary()
416416
417417std::unique_ptr<Test> ascii_line (size_t line_length)
418418{
419- auto name = std::to_string (line_length) + " chars per line " ;
419+ auto name = std::to_string (line_length) + " _chars_per_line " ;
420420 auto text = std::string (line_length, ' a' ) + std::string { " \n " };
421421 return std::make_unique<Line>(name, text);
422422}
423423
424424std::unique_ptr<Test> sgr_line (size_t line_length)
425425{
426- auto name = std::to_string (line_length) + " chars with sgr per line " ;
426+ auto name = std::to_string (line_length) + " _chars_with_sgr_per_line " ;
427427 std::string text {};
428428 text += " \033 [38;2;20;200;200m" ;
429429 text += std::string (line_length, ' a' );
@@ -434,7 +434,7 @@ std::unique_ptr<Test> sgr_line(size_t line_length)
434434
435435std::unique_ptr<Test> sgrbg_line (size_t line_length)
436436{
437- auto name = std::to_string (line_length) + " chars with sgr and bg per line " ;
437+ auto name = std::to_string (line_length) + " _chars_with_sgr_and_bg_per_line " ;
438438 std::string text {};
439439 text += " \033 [38;2;20;200;200m\033 [48;2;100;100;100m" ;
440440 text += std::string (line_length, ' a' );
@@ -445,7 +445,7 @@ std::unique_ptr<Test> sgrbg_line(size_t line_length)
445445
446446std::unique_ptr<Test> unicode_simple (size_t line_length)
447447{
448- auto name = std::to_string (line_length) + " unicode simple " ;
448+ auto name = std::to_string (line_length) + " _unicode_simple " ;
449449 std::string text {};
450450 for (size_t i = 0 ; i < line_length; ++i)
451451 text += " \u0061 " ;
@@ -455,7 +455,7 @@ std::unique_ptr<Test> unicode_simple(size_t line_length)
455455
456456std::unique_ptr<Test> unicode_two_codepoints (size_t line_length)
457457{
458- auto name = std::to_string (line_length) + " unicode diacritic " ;
458+ auto name = std::to_string (line_length) + " _unicode_diacritic " ;
459459 std::string text {};
460460 for (size_t i = 0 ; i < line_length; ++i)
461461 text += " \u0061\u0308 " ;
@@ -465,37 +465,60 @@ std::unique_ptr<Test> unicode_two_codepoints(size_t line_length)
465465
466466std::unique_ptr<Test> unicode_three_codepoints (size_t line_length)
467467{
468- auto name = std::to_string (line_length) + " unicode double diacritic " ;
468+ auto name = std::to_string (line_length) + " _unicode_double_diacritic " ;
469469 std::string text {};
470470 for (size_t i = 0 ; i < static_cast <size_t >(line_length / 2 ); ++i)
471471 text += " \u0061\u035D\u0062 " ;
472472 text += " \n " ;
473473 return std::make_unique<Line>(name, text);
474474}
475475
476- std::unique_ptr<Test> unicode_fire_as_text (size_t line_length)
476+ std::unique_ptr<Test> unicode_fire (size_t line_length)
477477{
478- auto name = std::to_string (line_length) + " unicode fire as text " ;
478+ auto name = std::to_string (line_length) + " _unicode_fire " ;
479479 std::string text {};
480480 for (size_t i = 0 ; i < static_cast <size_t >(line_length / 2 ); ++i)
481- text += std::string { " \U0001F525\U0000FE0E " };
481+ text += std::string { " \U0001F525 " };
482482 text += std::string { " \n " };
483483 return std::make_unique<Line>(name, text);
484484}
485485
486- std::unique_ptr<Test> unicode_fire (size_t line_length)
486+
487+ /* Creates rectangular block:
488+ * u --- f
489+ * | |
490+ * b --- d
491+ * with each side being line_length long.
492+ * */
493+ std::unique_ptr<Test> vt_movement (size_t line_length)
487494{
488- auto name = std::to_string (line_length) + " unicode fire " ;
495+ auto name = std::to_string (line_length) + " _vt_movement " ;
489496 std::string text {};
490- for (size_t i = 0 ; i < static_cast <size_t >(line_length / 2 ); ++i)
491- text += std::string { " \U0001F525 " };
497+ text += std::format (" \033 [{}Au\033 [1D" , line_length); // up
498+ text += std::format (" \033 [{}Cf\033 [1D" , line_length); // forward
499+ text += std::format (" \033 [{}Bd\033 [1D" , line_length); // down
500+ text += std::format (" \033 [{}Db\033 [1D" , line_length); // backward
492501 text += std::string { " \n " };
493502 return std::make_unique<Line>(name, text);
494503}
495504
505+
506+ /* Inserts lines and columns
507+ */
508+ std::unique_ptr<Test> vt_insert (size_t line_length)
509+ {
510+ auto name = std::to_string (line_length) + " _vt_insert" ;
511+ std::string text {};
512+ text += std::format (" \033 [{}L" , line_length); // insert lines IL
513+ text += std::format (" \033 [{}{}" , line_length, " '}" ); // insert columns DECIC
514+ text += std::string { " \n " };
515+ return std::make_unique<Line>(name, text);
516+
517+ }
518+
496519std::unique_ptr<Test> unicode_flag (size_t line_length)
497520{
498- auto name = std::to_string (line_length) + " unicode flag " ;
521+ auto name = std::to_string (line_length) + " _unicode_flag " ;
499522 std::string text {};
500523 std::string flag {};
501524 flag += " \U0001F3F4 " ;
0 commit comments