use std::time::Duration; use quine_mccluskey as qmc; static TERMS1: &[u32] = &[ 107, 548, 46, 906, 226, 529, 716, 814, 972, 652, 89, 810, 231, 524, 113, 853, 59, 184, 947, 295, 172, 971, 837, 769, 1009, 533, 274, 458, 314, 879, 44, 324, 348, 569, 262, 822, 474, 532, 359, 876, 111, 208, 293, 471, 750, 153, 81, 648, 668, 847, 671, 592, 212, 964, 1008, 20, 744, 404, 888, 268, 786, 596, 216, 429, 214, 587, 5, 572, 1023, 556, 279, 549, 515, 537, 531, 594, 715, 845, 915, 873, 753, 667, 209, 288, 687, 838, 975, 406, 318, 339, 357, 1005, 205, 850, 688, 858, 570, 1016, 271, 899, 979, 1, 518, 867, 51, 903, 343, 566, 355, 121, 496, 90, 311, 69, 264, 893, 421, 547, 784, 215, 936, 761, 94, 560, 244, 863, 75, 747, 310, 966, 823, 842, 102, 161, 559, 918, 508, 720, 523, 234, 145, 646, 130, 133, 489, 15, 14, 450, 88, 286, 945, 321, 459, 485, 119, 500, 589, 48, 981, 307, 463, 370, 660, 235, 877, 377, 749, 699, 247, 1011, 195, 526, 21, 466, 502, 409, 550, 239, 412, 386, 522, 232, 43, 815, 114, 680, 631, 229, 1001, 535, 284, 792, 196, 634, 430, 405, 125, 185, 995, 603, 598, 187, 243, 27, 378, 779, 820, 691, 7, 30, 703, 968, 542, 476, 599, 131, 872, 237, 911, 950, 651, 849, 546, 63, 794, 754, 763, 499, 135, 316, 528, 990, 31, 886, 257, 632, 445, 304, 708, 198, 68, 983, 1010, 832, 109, 939, 765, 638, 1006, 663, 301, 182, 171, 124, 17, 974, 751, 626, 878, 952, 401, 938, 267, 36, 611, 633, 16, 839, 54, 816, 250, 78, 562, 202, 727, 150, 682, 417, 238, 925, 817, 756, 294, 989, 331, 361, 588, 436, 220, 11, 330, 120, 259, 913, 472, 946, 612, 924, 221, 579, 739, 426, 593, 614, 861, 737, 591, 118, 841, 32, 350, 149, 168, 365, 729, 236, 573, 517, 993, 674, 180, 177, 446, 800, 901, 509, 255, 659, 1013, 758, 152, 363, ]; static TERMS2: &[u32] = &[ 393, 654, 432, 836, 618, 793, 919, 874, 647, 767, 19, 354, 534, 207, 24, 675, 862, 141, 905, 1019, 65, 74, 115, 415, 253, 986, 303, 501, 336, 880, 1014, 317, 731, 104, 718, 826, 871, 554, 512, 162, 289, 320, 461, 831, 280, 697, 56, 338, 97, 507, 662, 372, 904, 319, 746, 773, 709, 807, 206, 921, 719, 923, 655, 455, 885, 478, 864, 645, 683, 460, 940, 742, 563, 300, 883, 597, 702, 93, 617, 10, 894, 389, 866, 0, 83, 228, 707, 623, 953, 621, 978, 77, 337, 99, 193, 487, 273, 846, 809, 369, 527, 640, 167, 328, 258, 613, 73, 636, 889, 801, 900, 774, 128, 644, 829, 721, 698, 222, 994, 830, 252, 481, 1012, 137, 134, 448, 575, 366, 441, 398, 103, 557, 1003, 270, 706, 602, 884, 772, 192, 796, 696, 410, 813, 388, 584, 762, 764, 701, 383, 465, 437, 958, 469, 302, 628, 230, 61, 96, 116, 281, 776, 910, 352, 821, 959, 724, 770, 567, 1017, 58, 40, 574, 681, 439, 725, 726, 390, 656, 561, 610, 427, 451, 333, 944, 175, 565, 582, 745, 520, 933, 42, 66, 160, 360, 991, 907, 100, 965, 735, 932, 414, 650, 970, 272, 539, 376, 730, 1000, 1022, 33, 506, 658, 260, 276, 275, 935, 895, 673, 399, 358, 504, 201, 984, 797, 857, 467, 200, 578, 296, 491, 219, 278, 129, 741, 960, 641, 380, 233, 891, 315, 804, 397, 178, 442, 1007, 999, 922, 684, 544, 387, 540, 39, 139, 558, 420, 385, 158, 748, 191, 620, 963, 325, 379, 373, 395, 775, 553, 917, 189, 227, 76, 639, 840, 788, 576, 665, 490, 428, 342, 424, 734, 183, 511, 852, 514, 110, 503, 670, 848, 516, 71, 943, 163, 396, 464, 677, 391, 37, 672, 413, 151, 967, 154, 174, 580, 218, 833, 444, 711, 676, 277, 105, 808, 976, 45, 941, 210, 657, 334, 781, 12, 364, 418, 384, 536, 127, 87, 909, 954, 1018, 403, 585, 723, 664, 146, 492, 855, 340, 694, 28, 136, 803, 452, 521, 805, 454, 101, 82, ]; #[test] #[should_panic(expected = "Timeout")] fn timeout() { qmc::minimize( &qmc::DEFAULT_VARIABLES[..10], TERMS1, TERMS2, qmc::SOP, false, Some(Duration::from_secs(1)), ) .unwrap(); } #[test] #[should_panic(expected = "Timeout")] fn timeout2() { qmc::minimize_minterms( &qmc::DEFAULT_VARIABLES[..10], TERMS1, TERMS2, false, Some(Duration::from_secs(1)), ) .unwrap(); } #[test] #[should_panic(expected = "Timeout")] fn timeout3() { qmc::minimize_maxterms( &qmc::DEFAULT_VARIABLES[..10], TERMS1, TERMS2, false, Some(Duration::from_secs(1)), ) .unwrap(); }