gbranden pushed a commit to branch branden-2023-07-05 in repository groff. commit 5a5ebab5d8b1a8c20c3ed4e272fe2f45b1669280 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Fri May 19 00:55:37 2023 -0500
[eqn]: Add assertions. * src/preproc/eqn/box.cpp (half_space_box::output, full_space_box::output, thick_space_box::output, half_space_box::output): Add assertions to catch unexpected flow of control. --- ChangeLog | 7 +++++++ src/preproc/eqn/box.cpp | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0cdc7f76b..f9d7fa40c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2023-05-19 G. Branden Robinson <g.branden.robin...@gmail.com> + + * src/preproc/eqn/box.cpp (half_space_box::output) + (full_space_box::output, thick_space_box::output) + (half_space_box::output): Add assertions to catch unexpected + flow of control. + 2023-05-19 G. Branden Robinson <g.branden.robin...@gmail.com> [eqn]: Implement tunable "half_space" and "full_space" diff --git a/src/preproc/eqn/box.cpp b/src/preproc/eqn/box.cpp index 18f9226e5..4519bcd48 100644 --- a/src/preproc/eqn/box.cpp +++ b/src/preproc/eqn/box.cpp @@ -604,6 +604,8 @@ void half_space_box::output() printf("\\h'%dM'", half_space); else if (output_format == mathml) printf("<mtext> </mtext>"); + else + assert("unimplemented output format"); } full_space_box::full_space_box() @@ -617,6 +619,8 @@ void full_space_box::output() printf("\\h'%dM'", full_space); else if (output_format == mathml) printf("<mtext>  </mtext>"); + else + assert("unimplemented output format"); } thick_space_box::thick_space_box() @@ -630,6 +634,8 @@ void thick_space_box::output() printf("\\h'%dM'", thick_space); else if (output_format == mathml) printf("<mtext>  </mtext>"); + else + assert("unimplemented output format"); } thin_space_box::thin_space_box() @@ -643,6 +649,8 @@ void thin_space_box::output() printf("\\h'%dM'", thin_space); else if (output_format == mathml) printf("<mtext> </mtext>"); + else + assert("unimplemented output format"); } void box_list::list_debug_print(const char *sep) _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit