1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "SanityChecks.h"
9 #include "TestScaling.h"
12 # include "TestDrawTargetD2D.h"
24 TestObject tests
[] = {
25 {new SanityChecks(), "Sanity Checks"},
27 {new TestDrawTargetD2D(), "DrawTarget (D2D)"},
29 {new TestPoint(), "Point Tests"},
30 {new TestScaling(), "Scaling Tests"} {new TestBugs(), "Bug Tests"}};
32 int totalFailures
= 0;
34 std::stringstream message
;
35 printf("------ STARTING RUNNING TESTS ------\n");
36 for (int i
= 0; i
< sizeof(tests
) / sizeof(TestObject
); i
++) {
37 message
<< "--- RUNNING TESTS: " << tests
[i
].name
<< " ---\n";
38 printf(message
.str().c_str());
41 totalTests
+= tests
[i
].test
->RunTests(&failures
);
42 totalFailures
+= failures
;
43 // Done with this test!
46 message
<< "------ FINISHED RUNNING TESTS ------\nTests run: " << totalTests
47 << " - Passes: " << totalTests
- totalFailures
48 << " - Failures: " << totalFailures
<< "\n";
49 printf(message
.str().c_str());