[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 104/115: [eqn]: Add assertions.
From: |
G. Branden Robinson |
Subject: |
[groff] 104/115: [eqn]: Add assertions. |
Date: |
Thu, 1 Jun 2023 10:46:18 -0400 (EDT) |
gbranden pushed a commit to branch branden-2022-06-01
in repository groff.
commit cb72b682f1cf1392bdc842f48de011ef5047a9d9
Author: G. Branden Robinson <g.branden.robinson@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 85558621f..a37b0b84a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-05-19 G. Branden Robinson <g.branden.robinson@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.robinson@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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 104/115: [eqn]: Add assertions.,
G. Branden Robinson <=