| 616 | } |
| 617 | |
| 618 | static void iden8mebi_test(void) { |
| 619 | /* iden composed with itself 2^23 times. */ |
| 620 | const unsigned char iden8mebi[23] = {0xe1, 0x08}; |
| 621 | const ubounded expectedCost = 1677721500; /* in milliWU */ |
| 622 | clock_t start, end; |
| 623 | double diff, bound; |
| 624 | start = clock(); |
| 625 | test_program("iden8mebi", iden8mebi, sizeof(iden8mebi), NULL, 0, SIMPLICITY_NO_ERROR, NULL, NULL, NULL, &expectedCost); |
| 626 | end = clock(); |
| 627 | diff = (double)(end - start) / CLOCKS_PER_SEC; |
| 628 | bound = (double)expectedCost / 1000. * secondsPerWU; |
| 629 | |
| 630 | printf("cpu_time_used by iden8mebi: %f s. (Should be less than %f s.)\n", diff, bound); |
| 631 | if (timing_flag) { |
| 632 | if (diff <= bound) { |
| 633 | successes++; |
| 634 | } else { |
| 635 | failures++; |
| 636 | printf("iden8mebi took too long.\n"); |
| 637 | } |
| 638 | } |
| 639 | } |
| 640 | static void exactBudget_test(void) { |
| 641 | /* Core Simplicity program with a cost that is exactly 410000 milliWU */ |
| 642 | const unsigned char program[] = { |
no test coverage detected