Re:Show HN: I built a web framework in C
by elevation on Thursday October 09, 2025 @10:56AM
(#45528603)
Nice work! I like the little test framework you built. Have you considered making runTest a macro so that you can print the name of the test along with the test result?
[ Parent
| on HN ]
Re:Show HN: I built a web framework in C
by ashtonjamesd on Thursday October 09, 2025 @10:58AM
(#45528626)
That's a very good idea actually and I had wanted to do that but it didn't click that you could do that with a macro!
Thank you, I'll will implement that :)
Re:Show HN: I built a web framework in C
by elevation on Thursday October 09, 2025 @11:14AM
(#45528845)
For the ultimate in readable test reports, you can prettify the test name by:
* dropping the prefix "test_" * substituting the "_" characters in the function for whitespace * uppercasing the first letter of each word.
So `test_tokenize_simple_model` becomes "Tokenize Simple Model".