mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
Before this change the meaning of test data in the ServerTest.404WithBodyTesting unit test entirely depended on the number of entries: - 2 entries: url, expected body - 4 entries: url, book name, book title and expected body This was fragile and non scalable (if other combinations of expected response data are needed). This commit defines a mini-DSL taking advantage of operator overloading that allows to define test data in a robust way with the help of the compiler. Some code in `TestContentIn404HtmlResponse` is obsoleted by this change however it is not removed in this commit so that the change is easier to understand. That will be done next.