Unit test improvements (#26965)

* Do not warn about display in unit tests

* Treat warnings as errors in unit tests

* Report actual filenames with unit tests
This commit is contained in:
Jason Smith 2024-04-13 14:11:51 -07:00 committed by GitHub
parent d10861e478
commit 1bb4a042e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 5 deletions

View file

@ -29,12 +29,13 @@
static std::list<MarlinTest*> all_marlin_tests;
MarlinTest::MarlinTest(const std::string _name, const void(*_test)(), const int _line)
: name(_name), test(_test), line(_line) {
MarlinTest::MarlinTest(const std::string _name, const void(*_test)(), const char *_file, const int _line)
: name(_name), test(_test), file(_file), line(_line) {
all_marlin_tests.push_back(this);
}
void MarlinTest::run() {
Unity.TestFile = file.c_str();
UnityDefaultTestRun((UnityTestFunction)test, name.c_str(), line);
}