int main(int argc, char *argv[]) { A* a = new A(); B* b = new B(); C* c = new C(); D* d = new D(); E* e = new E(); test_A(a); test_B(b); test_C(c); test_D(d); test_E(e); std::cout << "--- Deleting ----" << std::endl; delete a; std::cout << "-----------------" << std::endl; delete b; std::cout << "-----------------" << std::endl; delete c; std::cout << "-----------------" << std::endl; delete d; std::cout << "-----------------" << std::endl; delete e; return 0; }
void test_syscall(int syscall) { //clear_log(); do_intercept(syscall, 0); do_as_guest("./test_full nonroot %d", syscall, 0); do_start(syscall, -2, -EINVAL); do_start(syscall, 0, 0); do_stop(syscall, 0, 0); do_start(syscall, 1, 0); do_as_guest("./test_full stop %d 1 %d", syscall, -EPERM); do_stop(syscall, 1, 0); do_as_guest("./test_full start %d -1 %d", syscall, 0); do_stop(syscall, last_child, -EINVAL); do_release(syscall, 0); puts("----- START OF test_PASS -----"); test_PASS(syscall); puts("----- END OF test_PASS -----"); puts("----- START OF test_A -----"); test_A(syscall); puts("----- END OF test_A -----"); puts("----- START OF test_B -----"); test_B(syscall, TRUE); puts("----- END OF test_B -----"); puts("----- START OF test_CDE ----"); test_CDE(syscall); puts("----- END OF test_CDE ----"); }
void test_C(C* c) { test_A(c); std::cout << "C----------------" << std::endl; c->f(); c->g(); }
void test_B(B* b) { test_A(b); std::cout << "B----------------" << std::endl; b->f(); b->g(); }
int main(int argc, char *argv[]) { int lucky = 42; printf("42 == %d\n", lucky); A* a = new A(); B* b = new B(); C* c = new C(); D* d = new D(); test_A(a); test_B(b); test_C(c); test_D(d); delete a; delete b; delete c; delete d; return 0; }
int main(int argc, char *argv[]) { A* a = new A(); B* b = new B(); C* c = new C(); D* d = new D(); E* e = new E(); test_A(a); test_B(b); test_C(c); test_D(d); test_E(e); delete a; delete b; delete c; delete d; delete e; return 0; }
static void udb_4(CuTest* t) { tc = t; test_A(); }
int main() { for (size_t i = 0; i < 1000; ++i) { test_A(); } return 0; }
void test_B(B* b) {test_A(b); b->f(); b->g();}