docs/Writerside/topics/test.h.md

changeset 1277
637d4775e79e
parent 1174
ee473780cc0d
--- a/docs/Writerside/topics/test.h.md	Sun Apr 06 13:13:52 2025 +0200
+++ b/docs/Writerside/topics/test.h.md	Sun Apr 06 13:21:17 2025 +0200
@@ -22,7 +22,7 @@
 
 <tabs>
 <tab title="Test">
-<code-block lang="C">
+<code-block lang="C"><![CDATA[
 CX_TEST(test_foo) {
     struct mystruct *x = malloc(sizeof(*x));
     x->d = 42;
@@ -38,10 +38,10 @@
     }
     free(x);
 }
-</code-block>
+]]></code-block>
 </tab>
 <tab title="Implementation">
-<code-block lang="C">
+<code-block lang="C"><![CDATA[
 struct mystruct {
     int d;
 };
@@ -49,7 +49,7 @@
 int foo(struct mystruct *s) {
     return s->d;
 }
-</code-block>
+]]></code-block>
 </tab>
 </tabs>
 
@@ -93,7 +93,7 @@
 Instead, you define a callable test subroutine with `CX_TEST_SUBROUTINE` and call it with `CX_TEST_CALL_SUBROUTINE`.
 The following example illustrates this with an adaption of the above test case.
 
-<code-block lang="C">
+<code-block lang="C"><![CDATA[
 CX_TEST_SUBROUTINE(test_foo_params, struct mystruct *x, int d) {
     x->d = d;
     CX_TEST_ASSERT(foo(x) == d);
@@ -108,7 +108,7 @@
     }
     free(x);
 }
-</code-block>
+]]></code-block>
 
 > Any test function, test case or test subroutine, is a normal C function.
 > As such you can decide to make them `static` when you do not want external linkage.

mercurial