Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
CSE3150_Project/EditorTest.cpp
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
61 lines (51 sloc)
1.66 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "EditorTest.h" | |
#include "EditorDataControllerTest.h" | |
#include "DocumentPageTest.h" | |
#include "DocumentParagraphTest.h" | |
#include "DocumentRowTest.h" | |
#include "DocumentTest.h" | |
#include "DocumentFormatterTest.h" | |
#include "VerbatimFormatterTest.h" | |
#include "RandomTests.h" | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
typedef unsigned long long _ull; | |
_ull testsRun = 0; | |
_ull testsPassed = 0; | |
_ull testsFailed = 0; | |
void Intro() | |
{ | |
cout << "========================================================================" << endl; | |
cout << "Beginning Unit Tests" << endl; | |
cout << "========================================================================" << endl; | |
} | |
void FinalReport() | |
{ | |
cout << "========================================================================" << endl; | |
cout << "Tests Run: " << testsRun << endl; | |
cout << "Tests Failed: " << testsFailed << endl; | |
cout << "Tests Passed: " << testsPassed << endl; | |
cout << "========================================================================" << endl; | |
} | |
int EditorTest() | |
{ | |
Intro(); | |
vector<ComponentTest*> tests; | |
tests.push_back(new EditorDataControllerTest()); | |
tests.push_back(new DocumentRowTest()); | |
tests.push_back(new DocumentParagraphTest()); | |
tests.push_back(new DocumentPageTest()); | |
tests.push_back(new DocumentTest()); | |
tests.push_back(new DocumentFormatterTest()); | |
tests.push_back(new VerbatimFormatterTest()); | |
// tests.push_back(new RandomTests()); | |
for (ComponentTest *test : tests) { | |
test->TestComponent(); | |
testsRun += test->GetTestCount(); | |
testsFailed += test->GetTestsFailed(); | |
testsPassed += test->GetTestsPassed(); | |
} | |
FinalReport(); | |
return 0; | |
} |