Adding copyright notices to most files. Also add readme file, and some
[jitcs.git] / tests / test_main.cpp
bloba915f10e365bbb162e17e245350139dbdb44682d
1 //===-- tests/test_main.cpp -------------------------------------*- C++ -*-===//
2 // Unit test program.
3 //
4 // Copyright (C) 2013-2014 Dirk Steinke.
5 // See copyright and license notice in COPYRIGHT or include/jitcs.h
6 //
7 // All tests register themselves when linked in, so the main function only
8 // needs to start running them.
9 //===----------------------------------------------------------------------===//
11 #include "unittest.h"
12 #include <stdio.h>
14 using namespace jitcs;
16 int main() {
17 UnitTest t;
19 UnitTestRegistry::get()->runTests(t);
21 printf("total number of successful tests: %d\n", t.getNumberOfSuccessfulTests());
22 printf("total number of failed tests: %d\n", t.getNumberOfFailedTests());
23 return t.getNumberOfFailedTests();