Step 182: improved diagnostics experience

This commit is contained in:
Bill
2026-02-09 22:43:06 -07:00
parent e05f83812c
commit 6d6ca625ff
7 changed files with 205 additions and 43 deletions

View File

@@ -0,0 +1,29 @@
// Step 182: Improved diagnostics UI checks.
#include <cassert>
#include <fstream>
#include <string>
static std::string readFile(const std::string& path) {
std::ifstream f(path);
if (!f.is_open()) return {};
return std::string((std::istreambuf_iterator<char>(f)),
std::istreambuf_iterator<char>());
}
static void assertContains(const std::string& text, const std::string& needle) {
assert(text.find(needle) != std::string::npos);
}
int main() {
const std::string bottom = readFile("src/panels/BottomPanel.h");
assertContains(bottom, "Sort By");
assertContains(bottom, "Fix All");
assertContains(bottom, "diagTable");
const std::string editorPanel = readFile("src/panels/EditorPanel.h");
assertContains(editorPanel, "diagCounts");
printf("step182_test: all assertions passed\n");
return 0;
}