MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / test

Method test

SRC/unittest/unittest.cpp:54–78  ·  view source on GitHub ↗

* @todo Add an output stream here such that * stdout/cout can go to an arbitrary * file, socket, whatever. */

Source from the content-addressed store, hash-verified

52 * file, socket, whatever.
53 */
54bool
55UnitTest::test() {
56
57 int i = 0;
58 bool passed = true;
59
60 if (testfunc == NULL) {
61 return false;
62 }
63
64 while (testfunc[i].test != NULL) {
65
66 print_header(stdout,testfunc[i].testname);
67
68 if (testfunc[i].test()) {
69 fprintf(stdout, "Passed test_%s.\n", testfunc[i].testname);
70 } else {
71 fprintf(stdout, "Failed test_%s.\n", testfunc[i].testname);
72 passed = false;
73 }
74 i++;
75 }
76
77 return passed;
78}
79
80

Calls

no outgoing calls

Tested by

no test coverage detected