Testing removing dublicated reports
This commit is contained in:
parent
47a7809398
commit
2c94e02260
3 changed files with 15 additions and 5 deletions
5
TODO
5
TODO
|
|
@ -1,9 +1,9 @@
|
||||||
Containers:
|
Containers:
|
||||||
ADd check copy times
|
ADd check copy times !
|
||||||
Addbuff
|
Addbuff
|
||||||
Vector
|
Vector
|
||||||
Vector 2d
|
Vector 2d
|
||||||
AVL dont copy data just swap
|
AVL dont copy data just swap !
|
||||||
|
|
||||||
Strings:
|
Strings:
|
||||||
Implement
|
Implement
|
||||||
|
|
@ -12,6 +12,7 @@ Math:
|
||||||
Implement
|
Implement
|
||||||
|
|
||||||
Utils:
|
Utils:
|
||||||
|
Group failed checks by source !!
|
||||||
Stack trace fixes
|
Stack trace fixes
|
||||||
|
|
||||||
Tokenizer:
|
Tokenizer:
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,13 @@ void Testing::endTest() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Testing::addFailedCheck(const FailedCheck& info) {
|
void Testing::addFailedCheck(const FailedCheck& info) {
|
||||||
mCurrent->mFailedChecks.pushBack(info);
|
DEBUG_BREAK(0 && info.expression);
|
||||||
|
auto lastRecord = &mCurrent->mFailedChecks.last()->data;
|
||||||
|
if (lastRecord && lastRecord->failedCheck.file == info.file && lastRecord->failedCheck.line == info.line) {
|
||||||
|
lastRecord->times++;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mCurrent->mFailedChecks.pushBack({ info, 1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
void Testing::reportState() {
|
void Testing::reportState() {
|
||||||
|
|
@ -58,7 +64,9 @@ void Testing::TestingNode::report(const char* path) const {
|
||||||
auto newPath = path ? std::string(path) + "/" + mName : std::string(mName);
|
auto newPath = path ? std::string(path) + "/" + mName : std::string(mName);
|
||||||
|
|
||||||
for (auto check : mFailedChecks) {
|
for (auto check : mFailedChecks) {
|
||||||
printf("%s Failed - (%s) %s:%llu\n", newPath.c_str(), check.data().expression, check.data().file, check.data().line);
|
auto failedCheck = &check.data().failedCheck;
|
||||||
|
auto times = check.data().times;
|
||||||
|
printf("%s Failed - (%s) %s:%llu x%i\n", newPath.c_str(), failedCheck->expression, failedCheck->file, failedCheck->line, (halni) times);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& child : mSubTests) {
|
for (const auto& child : mSubTests) {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@ namespace tp {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct TestingNode {
|
struct TestingNode {
|
||||||
List<FailedCheck> mFailedChecks;
|
struct FailedCheckRecord { FailedCheck failedCheck; ualni times; };
|
||||||
|
List<FailedCheckRecord> mFailedChecks;
|
||||||
List<TestingNode*> mSubTests;
|
List<TestingNode*> mSubTests;
|
||||||
const char* mName = "Unnamed";
|
const char* mName = "Unnamed";
|
||||||
TestingNode* mParent = nullptr;
|
TestingNode* mParent = nullptr;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue