5 #ifndef YMIR_TESTUTILS_H_H 6 #define YMIR_TESTUTILS_H_H 18 #define YMIR_TEST(res) { all_tests += 1; if (res.size() == 0) {tests_passed += 1;} \ 20 failed_test_info.push_back(TestInfo(#res, res)); \ 24 #define YMIR_TEST_START(funname) vector<string> funname() { std::cout << " --- " << (#funname) << std::endl; vector<string> _failed_cases; 25 #define YMIR_ASSERT(expr) { if (!(expr)) { _failed_cases.push_back(#expr); } }; 26 #define YMIR_ASSERT2(expr1, expr2) { if ((expr1) != (expr2)) { std::stringstream ss; ss << #expr1 << " == " << #expr2 << " (result: " << (expr1) << ", need: " << (expr2) << ")";_failed_cases.push_back(ss.str()); } }; 27 #define YMIR_TEST_END std::cout << std::endl; return _failed_cases; } 29 #define YMIR_TEST_PRECISION 1e-14 33 vector<string> failed_cases;
35 TestInfo(
const string& name,
const vector<string> vec) : test_name(name), failed_cases(vec) {}
40 vector<event_ind_t> v2;
41 vector<event_ind_t> v3;
45 v1.push_back(.05); v1.push_back(.025); v1.push_back(.035);
46 v1.push_back(.045); v1.push_back(.055); v1.push_back(.065);
47 v1.push_back(.075); v1.push_back(.085); v1.push_back(.565);
54 v1.push_back(.4); v1.push_back(.5); v1.push_back(.05); v1.push_back(.02); v1.push_back(.03);
57 v1.push_back(.3); v1.push_back(.1); v1.push_back(.2); v1.push_back(.4);
60 v1.push_back(.75); v1.push_back(.005); v1.push_back(.01); v1.push_back(.02);
61 v1.push_back(.03); v1.push_back(.04); v1.push_back(.145);
70 v1.push_back(.07); v1.push_back(.2); v1.push_back(.3);
71 v1.push_back(.34); v1.push_back(.03); v1.push_back(.05);
76 v1.push_back(.125); v1.push_back(.175); v1.push_back(.3);
77 v1.push_back(.19); v1.push_back(.21);
81 v1.push_back(.1); v1.push_back(.2); v1.push_back(.01); v1.push_back(.02);
82 v1.push_back(.03); v1.push_back(.04); v1.push_back(.6);
89 v1.push_back(.05); v1.push_back(.1); v1.push_back(.15); v1.push_back(.2); v1.push_back(.25); v1.push_back(.24); v1.push_back(.01);
96 v1.push_back(.1); v1.push_back(.2); v1.push_back(.3); v1.push_back(.4);
108 vector<event_ind_t> v2;
109 vector<event_ind_t> v3;
110 vector<seq_len_t> v4;
113 v1.push_back(.049); v1.push_back(.026); v1.push_back(.035);
114 v1.push_back(.046); v1.push_back(.054); v1.push_back(.065);
115 v1.push_back(.075); v1.push_back(.084); v1.push_back(.566);
122 v1.push_back(.5); v1.push_back(.4); v1.push_back(.06); v1.push_back(.01); v1.push_back(.03);
125 v1.push_back(.4); v1.push_back(.11); v1.push_back(.1); v1.push_back(.39);
128 v1.push_back(.75); v1.push_back(.005); v1.push_back(.01); v1.push_back(.02);
129 v1.push_back(.03); v1.push_back(.04); v1.push_back(.145);
138 v1.push_back(.07); v1.push_back(.2); v1.push_back(.3);
139 v1.push_back(.34); v1.push_back(.03); v1.push_back(.05);
144 v1.push_back(.125); v1.push_back(.175); v1.push_back(.3);
145 v1.push_back(.19); v1.push_back(.21);
149 v1.push_back(.1); v1.push_back(.2); v1.push_back(.01); v1.push_back(.02);
150 v1.push_back(.03); v1.push_back(.04); v1.push_back(.6);
157 v1.push_back(.1); v1.push_back(.05); v1.push_back(.2); v1.push_back(.15); v1.push_back(.24); v1.push_back(.01); v1.push_back(.25);
164 v1.push_back(.4); v1.push_back(.3); v1.push_back(.2); v1.push_back(.1);
176 vector<event_ind_t> v2;
177 vector<event_ind_t> v3;
178 vector<seq_len_t> v4;
181 v1.push_back(.5); v1.push_back(.25); v1.push_back(.25);
189 v1.push_back(.01); v1.push_back(.02); v1.push_back(.03);
190 v1.push_back(.04); v1.push_back(.05); v1.push_back(.07);
191 v1.push_back(.08); v1.push_back(.09); v1.push_back(.61);
199 v1.push_back(.4); v1.push_back(.5); v1.push_back(.05); v1.push_back(.02); v1.push_back(.03);
202 v1.push_back(.3); v1.push_back(.1); v1.push_back(.2); v1.push_back(.4);
205 v1.push_back(.75); v1.push_back(.005); v1.push_back(.01); v1.push_back(.02);
206 v1.push_back(.03); v1.push_back(.04); v1.push_back(.145);
215 v1.push_back(.07); v1.push_back(.2); v1.push_back(.3);
216 v1.push_back(.34); v1.push_back(.03); v1.push_back(.05);
220 v1.push_back(.125); v1.push_back(.175); v1.push_back(.3);
221 v1.push_back(.19); v1.push_back(.21);
224 v1.push_back(.1); v1.push_back(.2); v1.push_back(.01); v1.push_back(.02);
225 v1.push_back(.03); v1.push_back(.04); v1.push_back(.6);
248 v1.push_back(.11); v1.push_back(.12);
249 v1.push_back(.13); v1.push_back(.14);
250 v1.push_back(.15); v1.push_back(.35);
269 v1.push_back(.05); v1.push_back(.1); v1.push_back(.15); v1.push_back(.2); v1.push_back(.25); v1.push_back(.24); v1.push_back(.01);
276 v1.push_back(.1); v1.push_back(.24); v1.push_back(.25); v1.push_back(.05); v1.push_back(.01); v1.push_back(.15); v1.push_back(.2);
284 v1.push_back(.05); v1.push_back(.08); v1.push_back(.03); v1.push_back(.84);
291 v1.push_back(.4); v1.push_back(.1); v1.push_back(.3); v1.push_back(.2);
298 v1.push_back(.25); v1.push_back(.1); v1.push_back(.15); v1.push_back(.5);
305 v1.push_back(.15); v1.push_back(.1); v1.push_back(.25); v1.push_back(.5);
313 v1.push_back(.25); v1.push_back(.1); v1.push_back(.15); v1.push_back(.5);
320 v1.push_back(.15); v1.push_back(.1); v1.push_back(.25); v1.push_back(.5);
327 v1.push_back(.05); v1.push_back(.08); v1.push_back(.03); v1.push_back(.84);
334 v1.push_back(.4); v1.push_back(.1); v1.push_back(.3); v1.push_back(.2);
340 vector<seq_len_t> v5;
351 vector<event_ind_t> v2;
352 vector<event_ind_t> v3;
353 vector<seq_len_t> v4;
356 v1.push_back(.5); v1.push_back(.15); v1.push_back(.35);
364 v1.push_back(.02); v1.push_back(.03); v1.push_back(.03);
365 v1.push_back(.03); v1.push_back(.04); v1.push_back(.06);
366 v1.push_back(.07); v1.push_back(.1); v1.push_back(.62);
374 v1.push_back(.5); v1.push_back(.4); v1.push_back(.04); v1.push_back(.03); v1.push_back(.03);
377 v1.push_back(.35); v1.push_back(.05); v1.push_back(.25); v1.push_back(.35);
380 v1.push_back(.74); v1.push_back(.006); v1.push_back(.02); v1.push_back(.01);
381 v1.push_back(.04); v1.push_back(.039); v1.push_back(.145);
390 v1.push_back(.08); v1.push_back(.1); v1.push_back(.2);
391 v1.push_back(.33); v1.push_back(.13); v1.push_back(.15);
395 v1.push_back(.125); v1.push_back(.175); v1.push_back(.3);
396 v1.push_back(.19); v1.push_back(.21);
399 v1.push_back(.11); v1.push_back(.1); v1.push_back(.02); v1.push_back(.02);
400 v1.push_back(.02); v1.push_back(.03); v1.push_back(.7);
423 v1.push_back(.12); v1.push_back(.11);
424 v1.push_back(.14); v1.push_back(.13);
425 v1.push_back(.16); v1.push_back(.34);
444 v1.push_back(.05); v1.push_back(.1); v1.push_back(.15); v1.push_back(.2); v1.push_back(.25); v1.push_back(.24); v1.push_back(.01);
451 v1.push_back(.1); v1.push_back(.24); v1.push_back(.25); v1.push_back(.05); v1.push_back(.01); v1.push_back(.15); v1.push_back(.2);
459 v1.push_back(.04); v1.push_back(.09); v1.push_back(.03); v1.push_back(.84);
466 v1.push_back(.4); v1.push_back(.2); v1.push_back(.2); v1.push_back(.2);
473 v1.push_back(.25); v1.push_back(.15); v1.push_back(.1); v1.push_back(.5);
480 v1.push_back(.15); v1.push_back(.15); v1.push_back(.2); v1.push_back(.5);
488 v1.push_back(.24); v1.push_back(.1); v1.push_back(.16); v1.push_back(.5);
495 v1.push_back(.16); v1.push_back(.1); v1.push_back(.24); v1.push_back(.5);
502 v1.push_back(.04); v1.push_back(.09); v1.push_back(.03); v1.push_back(.84);
509 v1.push_back(.4); v1.push_back(.11); v1.push_back(.29); v1.push_back(.2);
515 vector<seq_len_t> v5;
525 #endif //YMIR_TESTUTILS_H_H
Definition: testutils.h:31
Class for storing parameters of assembling statistical model. Note: event with index 0 (zero) is "nul...
Definition: modelparametervector.h:68