Files
@ 52ae67e7183e
Branch filter:
Location: CSY/reowolf/src/protocol/tests/utils.rs - annotation
52ae67e7183e
45.6 KiB
application/rls-services+xml
Remove stale code in testing suite
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 | fc2d65a1b906 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 87aa65714efe 9774ef9fe888 9774ef9fe888 9774ef9fe888 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 87aa65714efe 012b61623f5a 87aa65714efe aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 8da6a7632169 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 120857c65991 aaeaf5986496 aaeaf5986496 87aa65714efe aaeaf5986496 9774ef9fe888 9774ef9fe888 d7baa792c2c2 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 9774ef9fe888 9774ef9fe888 9774ef9fe888 fc2d65a1b906 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 ba57649f36e2 ba57649f36e2 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 5051cf740055 aaeaf5986496 aaeaf5986496 5051cf740055 aaeaf5986496 e24c723760cb f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 012b61623f5a f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 012b61623f5a 5051cf740055 5051cf740055 5051cf740055 5051cf740055 ba57649f36e2 ba57649f36e2 ba57649f36e2 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 f7c20c8ac012 f7c20c8ac012 5051cf740055 f7c20c8ac012 f7c20c8ac012 5051cf740055 f7c20c8ac012 f7c20c8ac012 d36ad4f5458b e24c723760cb e24c723760cb e24c723760cb 012b61623f5a e24c723760cb e24c723760cb e24c723760cb e24c723760cb 9774ef9fe888 e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 9774ef9fe888 ba57649f36e2 ba57649f36e2 aaeaf5986496 aaeaf5986496 aaeaf5986496 ba57649f36e2 ba57649f36e2 aaeaf5986496 aaeaf5986496 aaeaf5986496 8da6a7632169 ba57649f36e2 aaeaf5986496 ba57649f36e2 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 ba57649f36e2 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 9774ef9fe888 ba57649f36e2 9774ef9fe888 ba57649f36e2 f7c20c8ac012 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 aaeaf5986496 aaeaf5986496 ba57649f36e2 012b61623f5a 9774ef9fe888 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 9774ef9fe888 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 ba57649f36e2 aaeaf5986496 ba57649f36e2 aaeaf5986496 012b61623f5a aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 9774ef9fe888 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 9774ef9fe888 9774ef9fe888 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 012b61623f5a 8da6a7632169 aaeaf5986496 aaeaf5986496 9774ef9fe888 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 012b61623f5a 012b61623f5a aaeaf5986496 aaeaf5986496 aaeaf5986496 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 ba57649f36e2 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 012b61623f5a f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 012b61623f5a f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 5051cf740055 5051cf740055 ba57649f36e2 ba57649f36e2 5051cf740055 5051cf740055 5051cf740055 ba57649f36e2 ba57649f36e2 5051cf740055 5051cf740055 5051cf740055 5051cf740055 ba57649f36e2 5051cf740055 ba57649f36e2 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 ba57649f36e2 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 ba57649f36e2 5051cf740055 ba57649f36e2 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 5051cf740055 5051cf740055 5051cf740055 ba57649f36e2 5051cf740055 ba57649f36e2 5051cf740055 012b61623f5a 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 5051cf740055 e24c723760cb 9774ef9fe888 1a42eb33aa76 e24c723760cb e24c723760cb e24c723760cb 1a42eb33aa76 9774ef9fe888 e24c723760cb e24c723760cb e24c723760cb 54cd3e2d6639 54cd3e2d6639 012b61623f5a 8da6a7632169 54cd3e2d6639 54cd3e2d6639 54cd3e2d6639 54cd3e2d6639 e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb 54cd3e2d6639 54cd3e2d6639 54cd3e2d6639 54cd3e2d6639 54cd3e2d6639 54cd3e2d6639 54cd3e2d6639 54cd3e2d6639 54cd3e2d6639 54cd3e2d6639 54cd3e2d6639 8da6a7632169 54cd3e2d6639 9774ef9fe888 8da6a7632169 8da6a7632169 54cd3e2d6639 8da6a7632169 54cd3e2d6639 54cd3e2d6639 54cd3e2d6639 012b61623f5a 8da6a7632169 54cd3e2d6639 54cd3e2d6639 54cd3e2d6639 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 e24c723760cb 8da6a7632169 8da6a7632169 8da6a7632169 54cd3e2d6639 9774ef9fe888 8da6a7632169 8da6a7632169 54cd3e2d6639 8da6a7632169 8da6a7632169 8da6a7632169 54cd3e2d6639 54cd3e2d6639 8da6a7632169 54cd3e2d6639 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 87aa65714efe e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 012b61623f5a 94751a00b9b7 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 b69f417a9972 9b32fa307ceb 9b32fa307ceb b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 3bb9f89521a1 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb d36ad4f5458b d36ad4f5458b d36ad4f5458b d36ad4f5458b d36ad4f5458b d36ad4f5458b d36ad4f5458b d36ad4f5458b 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 3bb9f89521a1 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 ef37386d0c6f 52ae67e7183e b69f417a9972 ef37386d0c6f b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 b69f417a9972 8da6a7632169 012b61623f5a e24c723760cb e24c723760cb e24c723760cb e24c723760cb 9774ef9fe888 8da6a7632169 9b32fa307ceb 54cd3e2d6639 e24c723760cb e24c723760cb 8da6a7632169 8da6a7632169 54cd3e2d6639 8da6a7632169 54cd3e2d6639 8da6a7632169 e24c723760cb 8da6a7632169 8da6a7632169 9b32fa307ceb 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 9774ef9fe888 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 ef37386d0c6f ef37386d0c6f 54cd3e2d6639 ef37386d0c6f ef37386d0c6f ef37386d0c6f ef37386d0c6f 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 9774ef9fe888 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 9b32fa307ceb 8da6a7632169 8da6a7632169 e24c723760cb e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 ef37386d0c6f ef37386d0c6f ef37386d0c6f ef37386d0c6f ef37386d0c6f ef37386d0c6f e406c61b1158 ef37386d0c6f e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 c87205ed6292 aaeaf5986496 aaeaf5986496 aaeaf5986496 c87205ed6292 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 c87205ed6292 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 87aa65714efe aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 aaeaf5986496 ef37386d0c6f ef37386d0c6f ef37386d0c6f f7c20c8ac012 ef37386d0c6f ef37386d0c6f ef37386d0c6f ef37386d0c6f ef37386d0c6f ef37386d0c6f ef37386d0c6f ef37386d0c6f f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 ba57649f36e2 ef37386d0c6f ef37386d0c6f f7c20c8ac012 f7c20c8ac012 ef37386d0c6f f7c20c8ac012 ba57649f36e2 f7c20c8ac012 ef37386d0c6f ba57649f36e2 8294209da734 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 f7c20c8ac012 ef37386d0c6f ef37386d0c6f ef37386d0c6f ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ba57649f36e2 ef37386d0c6f ef37386d0c6f ef37386d0c6f ef37386d0c6f ba57649f36e2 ba57649f36e2 ef37386d0c6f ef37386d0c6f f7c20c8ac012 ef37386d0c6f f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 012b61623f5a aaeaf5986496 aaeaf5986496 012b61623f5a 012b61623f5a 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 9b32fa307ceb 012b61623f5a 9b32fa307ceb 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 9b32fa307ceb aaeaf5986496 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 9b32fa307ceb 012b61623f5a 012b61623f5a aaeaf5986496 012b61623f5a 012b61623f5a 012b61623f5a 85419b0950c7 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a aaeaf5986496 aaeaf5986496 012b61623f5a 012b61623f5a aaeaf5986496 012b61623f5a 012b61623f5a e24c723760cb e24c723760cb 8da6a7632169 6929a6091ed6 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 012b61623f5a 012b61623f5a 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 012b61623f5a 012b61623f5a 8da6a7632169 8da6a7632169 8da6a7632169 ba57649f36e2 ba57649f36e2 ba57649f36e2 8da6a7632169 012b61623f5a f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 f7c20c8ac012 8da6a7632169 ba57649f36e2 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 8da6a7632169 87aa65714efe e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 8da6a7632169 e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb 012b61623f5a e24c723760cb 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a e24c723760cb e24c723760cb e24c723760cb 012b61623f5a 012b61623f5a e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb 8da6a7632169 e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb 6929a6091ed6 6929a6091ed6 3bb9f89521a1 3bb9f89521a1 6929a6091ed6 e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb 8da6a7632169 e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a e24c723760cb e24c723760cb e24c723760cb 68a065935a85 68a065935a85 68a065935a85 e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb 87aa65714efe e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb 8da6a7632169 e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a 012b61623f5a e24c723760cb e24c723760cb e24c723760cb e24c723760cb 012b61623f5a e24c723760cb e24c723760cb 012b61623f5a e24c723760cb e24c723760cb 87aa65714efe 87aa65714efe 87aa65714efe 87aa65714efe 87aa65714efe 87aa65714efe e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb e24c723760cb 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e 52ae67e7183e aaeaf5986496 | use crate::collections::StringPool;
use crate::protocol::{Module, ast::*, input_source::*, parser::{
Parser,
type_table::*,
symbol_table::SymbolTable,
token_parsing::*,
}, eval::*, RunContext};
// Carries information about the test into utility structures for builder-like
// assertions
#[derive(Clone, Copy)]
struct TestCtx<'a> {
test_name: &'a str,
heap: &'a Heap,
modules: &'a Vec<Module>,
types: &'a TypeTable,
symbols: &'a SymbolTable,
}
//------------------------------------------------------------------------------
// Interface for parsing and compiling
//------------------------------------------------------------------------------
pub(crate) struct Tester {
test_name: String,
sources: Vec<String>
}
impl Tester {
/// Constructs a new tester, allows adding multiple sources before compiling
pub(crate) fn new<S: ToString>(test_name: S) -> Self {
Self{
test_name: test_name.to_string(),
sources: Vec::new()
}
}
/// Utility for quick tests that use a single source file and expect the
/// compilation to succeed.
pub(crate) fn new_single_source_expect_ok<T: ToString, S: ToString>(test_name: T, source: S) -> AstOkTester {
Self::new(test_name)
.with_source(source)
.compile()
.expect_ok()
}
/// Utility for quick tests that use a single source file and expect the
/// compilation to fail.
pub(crate) fn new_single_source_expect_err<T: ToString, S: ToString>(test_name: T, source: S) -> AstErrTester {
Self::new(test_name)
.with_source(source)
.compile()
.expect_err()
}
pub(crate) fn with_source<S: ToString>(mut self, source: S) -> Self {
self.sources.push(source.to_string());
self
}
pub(crate) fn compile(self) -> AstTesterResult {
let mut parser = Parser::new();
for source in self.sources.into_iter() {
let source = source.into_bytes();
let input_source = InputSource::new(String::from(""), source);
if let Err(err) = parser.feed(input_source) {
return AstTesterResult::Err(AstErrTester::new(self.test_name, err))
}
}
if let Err(err) = parser.parse() {
return AstTesterResult::Err(AstErrTester::new(self.test_name, err))
}
AstTesterResult::Ok(AstOkTester::new(self.test_name, parser))
}
}
pub(crate) enum AstTesterResult {
Ok(AstOkTester),
Err(AstErrTester)
}
impl AstTesterResult {
pub(crate) fn expect_ok(self) -> AstOkTester {
match self {
AstTesterResult::Ok(v) => v,
AstTesterResult::Err(err) => {
let wrapped = ErrorTester{ test_name: &err.test_name, error: &err.error };
println!("DEBUG: Full error:\n{}", &err.error);
assert!(
false,
"[{}] Expected compilation to succeed, but it failed with {}",
err.test_name, wrapped.assert_postfix()
);
unreachable!();
}
}
}
pub(crate) fn expect_err(self) -> AstErrTester {
match self {
AstTesterResult::Ok(ok) => {
assert!(false, "[{}] Expected compilation to fail, but it succeeded", ok.test_name);
unreachable!();
},
AstTesterResult::Err(err) => err,
}
}
}
//------------------------------------------------------------------------------
// Interface for successful compilation
//------------------------------------------------------------------------------
#[allow(dead_code)]
pub(crate) struct AstOkTester {
test_name: String,
modules: Vec<Module>,
heap: Heap,
symbols: SymbolTable,
types: TypeTable,
pool: StringPool, // This is stored because if we drop it on the floor, we lose all our `StringRef<'static>`s
}
impl AstOkTester {
fn new(test_name: String, parser: Parser) -> Self {
Self {
test_name,
modules: parser.modules.into_iter().map(|module| Module{
source: module.source,
root_id: module.root_id,
name: module.name.map(|(_, name)| name)
}).collect(),
heap: parser.heap,
symbols: parser.symbol_table,
types: parser.type_table,
pool: parser.string_pool,
}
}
pub(crate) fn for_struct<F: Fn(StructTester)>(self, name: &str, f: F) -> Self {
let mut found = false;
for definition in self.heap.definitions.iter() {
if let Definition::Struct(ast_definition) = definition {
if ast_definition.identifier.value.as_str() != name {
continue;
}
// Found struct with the same name
let definition_id = ast_definition.this.upcast();
let type_entry = self.types.get_base_definition(&definition_id).unwrap();
let type_definition = type_entry.definition.as_struct();
let tester = StructTester::new(self.ctx(), ast_definition, type_definition);
f(tester);
found = true;
break
}
}
assert!(
found, "[{}] Failed to find definition for struct '{}'",
self.test_name, name
);
self
}
pub(crate) fn for_enum<F: Fn(EnumTester)>(self, name: &str, f: F) -> Self {
let mut found = false;
for definition in self.heap.definitions.iter() {
if let Definition::Enum(definition) = definition {
if definition.identifier.value.as_str() != name {
continue;
}
// Found enum with the same name
let tester = EnumTester::new(self.ctx(), definition);
f(tester);
found = true;
break;
}
}
assert!(
found, "[{}] Failed to find definition for enum '{}'",
self.test_name, name
);
self
}
pub(crate) fn for_union<F: Fn(UnionTester)>(self, name: &str, f: F) -> Self {
let mut found = false;
for definition in self.heap.definitions.iter() {
if let Definition::Union(definition) = definition {
if definition.identifier.value.as_str() != name {
continue;
}
// Found union with the same name
let definition_id = definition.this.upcast();
let base_type = self.types.get_base_definition(&definition_id).unwrap();
let tester = UnionTester::new(self.ctx(), definition, &base_type.definition.as_union());
f(tester);
found = true;
break;
}
}
assert!(
found, "[{}] Failed to find definition for union '{}'",
self.test_name, name
);
self
}
pub(crate) fn for_function<F: FnOnce(FunctionTester)>(self, name: &str, f: F) -> Self {
let mut found = false;
for definition in self.heap.definitions.iter() {
if let Definition::Function(definition) = definition {
if definition.identifier.value.as_str() != name {
continue;
}
// Found function
let tester = FunctionTester::new(self.ctx(), definition);
f(tester);
found = true;
break;
}
}
if found { return self }
assert!(
false, "[{}] failed to find definition for function '{}'",
self.test_name, name
);
unreachable!();
}
fn ctx(&self) -> TestCtx {
TestCtx{
test_name: &self.test_name,
modules: &self.modules,
heap: &self.heap,
types: &self.types,
symbols: &self.symbols,
}
}
}
//------------------------------------------------------------------------------
// Utilities for successful compilation
//------------------------------------------------------------------------------
pub(crate) struct StructTester<'a> {
ctx: TestCtx<'a>,
ast_def: &'a StructDefinition,
type_def: &'a StructType,
}
impl<'a> StructTester<'a> {
fn new(ctx: TestCtx<'a>, ast_def: &'a StructDefinition, type_def: &'a StructType) -> Self {
Self{ ctx, ast_def, type_def }
}
pub(crate) fn assert_num_fields(self, num: usize) -> Self {
assert_eq!(
num, self.ast_def.fields.len(),
"[{}] Expected {} struct fields, but found {} for {}",
self.ctx.test_name, num, self.ast_def.fields.len(), self.assert_postfix()
);
self
}
pub(crate) fn assert_num_monomorphs(self, num: usize) -> Self {
let (is_equal, num_encountered) = has_equal_num_monomorphs(self.ctx, num, self.ast_def.this.upcast());
assert!(
is_equal, "[{}] Expected {} monomorphs, but got {} for {}",
self.ctx.test_name, num, num_encountered, self.assert_postfix()
);
self
}
pub(crate) fn assert_has_monomorph(self, serialized_monomorph: &str) -> Self {
let (has_monomorph, serialized) = has_monomorph(self.ctx, self.ast_def.this.upcast(), serialized_monomorph);
assert!(
has_monomorph.is_some(), "[{}] Expected to find monomorph {}, but got {} for {}",
self.ctx.test_name, serialized_monomorph, &serialized, self.assert_postfix()
);
self
}
pub(crate) fn assert_size_alignment(mut self, monomorph: &str, size: usize, alignment: usize) -> Self {
self = self.assert_has_monomorph(monomorph);
let (mono_idx, _) = has_monomorph(self.ctx, self.ast_def.this.upcast(), monomorph);
let mono_idx = mono_idx.unwrap();
let mono = &self.type_def.monomorphs[mono_idx];
assert!(
mono.size == size && mono.alignment == alignment,
"[{}] Expected (size,alignment) of ({}, {}), but got ({}, {}) for {}",
self.ctx.test_name, size, alignment, mono.size, mono.alignment, self.assert_postfix()
);
self
}
pub(crate) fn for_field<F: Fn(StructFieldTester)>(self, name: &str, f: F) -> Self {
// Find field with specified name
for field in &self.ast_def.fields {
if field.field.value.as_str() == name {
let tester = StructFieldTester::new(self.ctx, field);
f(tester);
return self;
}
}
assert!(
false, "[{}] Could not find struct field '{}' for {}",
self.ctx.test_name, name, self.assert_postfix()
);
unreachable!();
}
fn assert_postfix(&self) -> String {
let mut v = String::new();
v.push_str("Struct{ name: ");
v.push_str(self.ast_def.identifier.value.as_str());
v.push_str(", fields: [");
for (field_idx, field) in self.ast_def.fields.iter().enumerate() {
if field_idx != 0 { v.push_str(", "); }
v.push_str(field.field.value.as_str());
}
v.push_str("] }");
v
}
}
pub(crate) struct StructFieldTester<'a> {
ctx: TestCtx<'a>,
def: &'a StructFieldDefinition,
}
impl<'a> StructFieldTester<'a> {
fn new(ctx: TestCtx<'a>, def: &'a StructFieldDefinition) -> Self {
Self{ ctx, def }
}
pub(crate) fn assert_parser_type(self, expected: &str) -> Self {
let mut serialized_type = String::new();
serialize_parser_type(&mut serialized_type, &self.ctx.heap, &self.def.parser_type);
assert_eq!(
expected, &serialized_type,
"[{}] Expected type '{}', but got '{}' for {}",
self.ctx.test_name, expected, &serialized_type, self.assert_postfix()
);
self
}
fn assert_postfix(&self) -> String {
let mut serialized_type = String::new();
serialize_parser_type(&mut serialized_type, &self.ctx.heap, &self.def.parser_type);
format!("StructField{{ name: {}, parser_type: {} }}", self.def.field.value.as_str(), serialized_type)
}
}
pub(crate) struct EnumTester<'a> {
ctx: TestCtx<'a>,
def: &'a EnumDefinition,
}
impl<'a> EnumTester<'a> {
fn new(ctx: TestCtx<'a>, def: &'a EnumDefinition) -> Self {
Self{ ctx, def }
}
pub(crate) fn assert_num_variants(self, num: usize) -> Self {
assert_eq!(
num, self.def.variants.len(),
"[{}] Expected {} enum variants, but found {} for {}",
self.ctx.test_name, num, self.def.variants.len(), self.assert_postfix()
);
self
}
pub(crate) fn assert_num_monomorphs(self, num: usize) -> Self {
let (is_equal, num_encountered) = has_equal_num_monomorphs(self.ctx, num, self.def.this.upcast());
assert!(
is_equal, "[{}] Expected {} monomorphs, but got {} for {}",
self.ctx.test_name, num, num_encountered, self.assert_postfix()
);
self
}
pub(crate) fn assert_has_monomorph(self, serialized_monomorph: &str) -> Self {
let (has_monomorph, serialized) = has_monomorph(self.ctx, self.def.this.upcast(), serialized_monomorph);
assert!(
has_monomorph.is_some(), "[{}] Expected to find monomorph {}, but got {} for {}",
self.ctx.test_name, serialized_monomorph, serialized, self.assert_postfix()
);
self
}
pub(crate) fn assert_postfix(&self) -> String {
let mut v = String::new();
v.push_str("Enum{ name: ");
v.push_str(self.def.identifier.value.as_str());
v.push_str(", variants: [");
for (variant_idx, variant) in self.def.variants.iter().enumerate() {
if variant_idx != 0 { v.push_str(", "); }
v.push_str(variant.identifier.value.as_str());
}
v.push_str("] }");
v
}
}
pub(crate) struct UnionTester<'a> {
ctx: TestCtx<'a>,
ast_def: &'a UnionDefinition,
type_def: &'a UnionType,
}
impl<'a> UnionTester<'a> {
fn new(ctx: TestCtx<'a>, ast_def: &'a UnionDefinition, type_def: &'a UnionType) -> Self {
Self{ ctx, ast_def, type_def }
}
pub(crate) fn assert_num_variants(self, num: usize) -> Self {
assert_eq!(
num, self.ast_def.variants.len(),
"[{}] Expected {} union variants, but found {} for {}",
self.ctx.test_name, num, self.ast_def.variants.len(), self.assert_postfix()
);
self
}
pub(crate) fn assert_num_monomorphs(self, num: usize) -> Self {
let (is_equal, num_encountered) = has_equal_num_monomorphs(self.ctx, num, self.ast_def.this.upcast());
assert!(
is_equal, "[{}] Expected {} monomorphs, but got {} for {}",
self.ctx.test_name, num, num_encountered, self.assert_postfix()
);
self
}
pub(crate) fn assert_has_monomorph(self, serialized_monomorph: &str) -> Self {
let (has_monomorph, serialized) = has_monomorph(self.ctx, self.ast_def.this.upcast(), serialized_monomorph);
assert!(
has_monomorph.is_some(), "[{}] Expected to find monomorph {}, but got {} for {}",
self.ctx.test_name, serialized_monomorph, serialized, self.assert_postfix()
);
self
}
pub(crate) fn assert_size_alignment(
mut self, serialized_monomorph: &str,
stack_size: usize, stack_alignment: usize, heap_size: usize, heap_alignment: usize
) -> Self {
self = self.assert_has_monomorph(serialized_monomorph);
let (mono_idx, _) = has_monomorph(self.ctx, self.ast_def.this.upcast(), serialized_monomorph);
let mono_idx = mono_idx.unwrap();
let mono = &self.type_def.monomorphs[mono_idx];
assert!(
stack_size == mono.stack_size && stack_alignment == mono.stack_alignment &&
heap_size == mono.heap_size && heap_alignment == mono.heap_alignment,
"[{}] Expected (stack | heap) (size, alignment) of ({}, {} | {}, {}), but got ({}, {} | {}, {}) for {}",
self.ctx.test_name,
stack_size, stack_alignment, heap_size, heap_alignment,
mono.stack_size, mono.stack_alignment, mono.heap_size, mono.heap_alignment,
self.assert_postfix()
);
self
}
fn assert_postfix(&self) -> String {
let mut v = String::new();
v.push_str("Union{ name: ");
v.push_str(self.ast_def.identifier.value.as_str());
v.push_str(", variants: [");
for (variant_idx, variant) in self.ast_def.variants.iter().enumerate() {
if variant_idx != 0 { v.push_str(", "); }
v.push_str(variant.identifier.value.as_str());
}
v.push_str("] }");
v
}
}
pub(crate) struct FunctionTester<'a> {
ctx: TestCtx<'a>,
def: &'a FunctionDefinition,
}
impl<'a> FunctionTester<'a> {
fn new(ctx: TestCtx<'a>, def: &'a FunctionDefinition) -> Self {
Self{ ctx, def }
}
pub(crate) fn for_variable<F: Fn(VariableTester)>(self, name: &str, f: F) -> Self {
// Seek through the blocks in order to find the variable
let wrapping_block_id = seek_stmt(
self.ctx.heap, self.def.body.upcast(),
&|stmt| {
if let Statement::Block(block) = stmt {
for local_id in &block.locals {
let var = &self.ctx.heap[*local_id];
if var.identifier.value.as_str() == name {
return true;
}
}
}
false
}
);
let mut found_local_id = None;
if let Some(block_id) = wrapping_block_id {
let block_stmt = self.ctx.heap[block_id].as_block();
for local_id in &block_stmt.locals {
let var = &self.ctx.heap[*local_id];
if var.identifier.value.as_str() == name {
found_local_id = Some(*local_id);
}
}
}
assert!(
found_local_id.is_some(), "[{}] Failed to find variable '{}' in {}",
self.ctx.test_name, name, self.assert_postfix()
);
let local = &self.ctx.heap[found_local_id.unwrap()];
// Find an instance of the variable expression so we can determine its
// type.
let var_expr = seek_expr_in_stmt(
self.ctx.heap, self.def.body.upcast(),
&|expr| {
if let Expression::Variable(variable_expr) = expr {
if variable_expr.identifier.value.as_str() == name {
return true;
}
}
false
}
);
assert!(
var_expr.is_some(), "[{}] Failed to find variable expression of '{}' in {}",
self.ctx.test_name, name, self.assert_postfix()
);
let var_expr = &self.ctx.heap[var_expr.unwrap()];
// Construct tester and pass to tester function
let tester = VariableTester::new(
self.ctx, self.def.this.upcast(), local,
var_expr.as_variable()
);
f(tester);
self
}
/// Finds a specific expression within a function. There are two matchers:
/// one outer matcher (to find a rough indication of the expression) and an
/// inner matcher to find the exact expression.
///
/// The reason being that, for example, a function's body might be littered
/// with addition symbols, so we first match on "some_var + some_other_var",
/// and then match exactly on "+".
pub(crate) fn for_expression_by_source<F: Fn(ExpressionTester)>(self, outer_match: &str, inner_match: &str, f: F) -> Self {
// Seek the expression in the source code
assert!(outer_match.contains(inner_match), "improper testing code");
let module = seek_def_in_modules(
&self.ctx.heap, &self.ctx.modules, self.def.this.upcast()
).unwrap();
// Find the first occurrence of the expression after the definition of
// the function, we'll check that it is included in the body later.
let mut outer_match_idx = self.def.span.begin.offset as usize;
while outer_match_idx < module.source.input.len() {
if module.source.input[outer_match_idx..].starts_with(outer_match.as_bytes()) {
break;
}
outer_match_idx += 1
}
assert!(
outer_match_idx < module.source.input.len(),
"[{}] Failed to find '{}' within the source that contains {}",
self.ctx.test_name, outer_match, self.assert_postfix()
);
let inner_match_idx = outer_match_idx + outer_match.find(inner_match).unwrap();
// Use the inner match index to find the expression
let expr_id = seek_expr_in_stmt(
&self.ctx.heap, self.def.body.upcast(),
&|expr| expr.operation_span().begin.offset as usize == inner_match_idx
);
assert!(
expr_id.is_some(),
"[{}] Failed to find '{}' within the source that contains {} \
(note: expression was found, but not within the specified function",
self.ctx.test_name, outer_match, self.assert_postfix()
);
let expr_id = expr_id.unwrap();
// We have the expression, call the testing function
let tester = ExpressionTester::new(
self.ctx, self.def.this.upcast(), &self.ctx.heap[expr_id]
);
f(tester);
self
}
pub(crate) fn call_ok(self, expected_result: Option<Value>) -> Self {
use crate::protocol::*;
let (prompt, result) = self.eval_until_end();
match result {
Ok(_) => {
assert!(
prompt.store.stack.len() > 0, // note: stack never shrinks
"[{}] No value on stack after calling function for {}",
self.ctx.test_name, self.assert_postfix()
);
},
Err(err) => {
println!("DEBUG: Formatted evaluation error:\n{}", err);
assert!(
false,
"[{}] Expected call to succeed, but got {:?} for {}",
self.ctx.test_name, err, self.assert_postfix()
)
}
}
if let Some(expected_result) = expected_result {
debug_assert!(expected_result.get_heap_pos().is_none(), "comparing against heap thingamajigs is not yet implemented");
assert!(
value::apply_equality_operator(&prompt.store, &prompt.store.stack[0], &expected_result),
"[{}] Result from call was {:?}, but expected {:?} for {}",
self.ctx.test_name, &prompt.store.stack[0], &expected_result, self.assert_postfix()
)
}
self
}
// Keeping this simple for now, will likely change
pub(crate) fn call_err(self, expected_result: &str) -> Self {
let (_, result) = self.eval_until_end();
match result {
Ok(_) => {
assert!(
false,
"[{}] Expected an error, but evaluation finished successfully for {}",
self.ctx.test_name, self.assert_postfix()
);
},
Err(err) => {
println!("DEBUG: Formatted evaluation error:\n{}", err);
debug_assert_eq!(err.statements.len(), 1);
assert!(
err.statements[0].message.contains(&expected_result),
"[{}] Expected error message to contain '{}', but it was '{}' for {}",
self.ctx.test_name, expected_result, err.statements[0].message, self.assert_postfix()
);
}
}
self
}
fn eval_until_end(&self) -> (Prompt, Result<EvalContinuation, EvalError>) {
use crate::protocol::*;
let mut prompt = Prompt::new(&self.ctx.types, &self.ctx.heap, self.def.this.upcast(), 0, ValueGroup::new_stack(Vec::new()));
let mut call_context = FakeRunContext{};
loop {
let result = prompt.step(&self.ctx.types, &self.ctx.heap, &self.ctx.modules, &mut call_context);
match result {
Ok(EvalContinuation::Stepping) => {},
_ => return (prompt, result),
}
}
}
fn assert_postfix(&self) -> String {
format!("Function{{ name: {} }}", self.def.identifier.value.as_str())
}
}
pub(crate) struct VariableTester<'a> {
ctx: TestCtx<'a>,
definition_id: DefinitionId,
variable: &'a Variable,
var_expr: &'a VariableExpression,
}
impl<'a> VariableTester<'a> {
fn new(
ctx: TestCtx<'a>, definition_id: DefinitionId, variable: &'a Variable, var_expr: &'a VariableExpression
) -> Self {
Self{ ctx, definition_id, variable, var_expr }
}
pub(crate) fn assert_parser_type(self, expected: &str) -> Self {
let mut serialized = String::new();
serialize_parser_type(&mut serialized, self.ctx.heap, &self.variable.parser_type);
assert_eq!(
expected, &serialized,
"[{}] Expected parser type '{}', but got '{}' for {}",
self.ctx.test_name, expected, &serialized, self.assert_postfix()
);
self
}
pub(crate) fn assert_concrete_type(self, expected: &str) -> Self {
// Lookup concrete type in type table
let mono_data = self.ctx.types.get_procedure_expression_data(&self.definition_id, 0);
let concrete_type = &mono_data.expr_data[self.var_expr.unique_id_in_definition as usize].expr_type;
// Serialize and check
let mut serialized = String::new();
serialize_concrete_type(&mut serialized, self.ctx.heap, self.definition_id, concrete_type);
assert_eq!(
expected, &serialized,
"[{}] Expected concrete type '{}', but got '{}' for {}",
self.ctx.test_name, expected, &serialized, self.assert_postfix()
);
self
}
fn assert_postfix(&self) -> String {
format!("Variable{{ name: {} }}", self.variable.identifier.value.as_str())
}
}
pub(crate) struct ExpressionTester<'a> {
ctx: TestCtx<'a>,
definition_id: DefinitionId, // of the enclosing function/component
expr: &'a Expression
}
impl<'a> ExpressionTester<'a> {
fn new(
ctx: TestCtx<'a>, definition_id: DefinitionId, expr: &'a Expression
) -> Self {
Self{ ctx, definition_id, expr }
}
pub(crate) fn assert_concrete_type(self, expected: &str) -> Self {
// Lookup concrete type
let mono_data = self.ctx.types.get_procedure_expression_data(&self.definition_id, 0);
let expr_index = self.expr.get_unique_id_in_definition();
let concrete_type = &mono_data.expr_data[expr_index as usize].expr_type;
// Serialize and check type
let mut serialized = String::new();
serialize_concrete_type(&mut serialized, self.ctx.heap, self.definition_id, concrete_type);
assert_eq!(
expected, &serialized,
"[{}] Expected concrete type '{}', but got '{}' for {}",
self.ctx.test_name, expected, &serialized, self.assert_postfix()
);
self
}
fn assert_postfix(&self) -> String {
format!(
"Expression{{ debug: {:?} }}",
self.expr
)
}
}
//------------------------------------------------------------------------------
// Interface for failed compilation
//------------------------------------------------------------------------------
pub(crate) struct AstErrTester {
test_name: String,
error: ParseError,
}
impl AstErrTester {
fn new(test_name: String, error: ParseError) -> Self {
Self{ test_name, error }
}
pub(crate) fn error<F: Fn(ErrorTester)>(&self, f: F) {
// Maybe multiple errors will be supported in the future
let tester = ErrorTester{ test_name: &self.test_name, error: &self.error };
f(tester)
}
}
//------------------------------------------------------------------------------
// Utilities for failed compilation
//------------------------------------------------------------------------------
pub(crate) struct ErrorTester<'a> {
test_name: &'a str,
error: &'a ParseError,
}
impl<'a> ErrorTester<'a> {
pub(crate) fn assert_num(self, num: usize) -> Self {
assert_eq!(
num, self.error.statements.len(),
"[{}] expected error to consist of '{}' parts, but encountered '{}' for {}",
self.test_name, num, self.error.statements.len(), self.assert_postfix()
);
self
}
pub(crate) fn assert_ctx_has(self, idx: usize, msg: &str) -> Self {
assert!(
self.error.statements[idx].context.contains(msg),
"[{}] expected error statement {}'s context to contain '{}' for {}",
self.test_name, idx, msg, self.assert_postfix()
);
self
}
pub(crate) fn assert_msg_has(self, idx: usize, msg: &str) -> Self {
assert!(
self.error.statements[idx].message.contains(msg),
"[{}] expected error statement {}'s message to contain '{}' for {}",
self.test_name, idx, msg, self.assert_postfix()
);
self
}
/// Seeks the index of the pattern in the context message, then checks if
/// the input position corresponds to that index.
pub (crate) fn assert_occurs_at(self, idx: usize, pattern: &str) -> Self {
let pos = self.error.statements[idx].context.find(pattern);
assert!(
pos.is_some(),
"[{}] incorrect occurs_at: '{}' could not be found in the context for {}",
self.test_name, pattern, self.assert_postfix()
);
let pos = pos.unwrap();
let col = self.error.statements[idx].start_column as usize;
assert_eq!(
pos + 1, col,
"[{}] Expected error to occur at column {}, but found it at {} for {}",
self.test_name, pos + 1, col, self.assert_postfix()
);
self
}
fn assert_postfix(&self) -> String {
let mut v = String::new();
v.push_str("error: [");
for (idx, stmt) in self.error.statements.iter().enumerate() {
if idx != 0 {
v.push_str(", ");
}
v.push_str(&format!("{{ context: {}, message: {} }}", &stmt.context, stmt.message));
}
v.push(']');
v
}
}
//------------------------------------------------------------------------------
// Generic utilities
//------------------------------------------------------------------------------
fn has_equal_num_monomorphs(ctx: TestCtx, num: usize, definition_id: DefinitionId) -> (bool, usize) {
use DefinedTypeVariant::*;
let type_def = ctx.types.get_base_definition(&definition_id).unwrap();
let num_on_type = match &type_def.definition {
Struct(v) => v.monomorphs.len(),
Enum(v) => v.monomorphs.len(),
Union(v) => v.monomorphs.len(),
Function(v) => v.monomorphs.len(),
Component(v) => v.monomorphs.len(),
};
(num_on_type == num, num_on_type)
}
fn has_monomorph(ctx: TestCtx, definition_id: DefinitionId, serialized_monomorph: &str) -> (Option<usize>, String) {
use DefinedTypeVariant::*;
let type_def = ctx.types.get_base_definition(&definition_id).unwrap();
// Note: full_buffer is just for error reporting
let mut full_buffer = String::new();
let mut has_match = None;
full_buffer.push('[');
let mut append_to_full_buffer = |concrete_type: &ConcreteType, mono_idx: usize| {
if full_buffer.len() != 1 {
full_buffer.push_str(", ");
}
full_buffer.push('"');
let first_idx = full_buffer.len();
serialize_concrete_type(&mut full_buffer, ctx.heap, definition_id, concrete_type);
if &full_buffer[first_idx..] == serialized_monomorph {
has_match = Some(mono_idx);
}
full_buffer.push('"');
};
match &type_def.definition {
Enum(definition) => {
for (mono_idx, mono) in definition.monomorphs.iter().enumerate() {
append_to_full_buffer(&mono.concrete_type, mono_idx);
}
},
Union(definition) => {
for (mono_idx, mono) in definition.monomorphs.iter().enumerate() {
append_to_full_buffer(&mono.concrete_type, mono_idx);
}
},
Struct(definition) => {
for (mono_idx, mono) in definition.monomorphs.iter().enumerate() {
append_to_full_buffer(&mono.concrete_type, mono_idx);
}
},
Function(_) | Component(_) => {
let monomorphs = type_def.definition.procedure_monomorphs();
for (mono_idx, mono) in monomorphs.iter().enumerate() {
append_to_full_buffer(&mono.concrete_type, mono_idx);
}
}
}
full_buffer.push(']');
(has_match, full_buffer)
}
fn serialize_parser_type(buffer: &mut String, heap: &Heap, parser_type: &ParserType) {
use ParserTypeVariant as PTV;
fn serialize_variant(buffer: &mut String, heap: &Heap, parser_type: &ParserType, mut idx: usize) -> usize {
match &parser_type.elements[idx].variant {
PTV::Void => buffer.push_str("void"),
PTV::InputOrOutput => {
buffer.push_str("portlike<");
idx = serialize_variant(buffer, heap, parser_type, idx + 1);
buffer.push('>');
},
PTV::ArrayLike => {
idx = serialize_variant(buffer, heap, parser_type, idx + 1);
buffer.push_str("[???]");
},
PTV::IntegerLike => buffer.push_str("integerlike"),
PTV::Message => buffer.push_str(KW_TYPE_MESSAGE_STR),
PTV::Bool => buffer.push_str(KW_TYPE_BOOL_STR),
PTV::UInt8 => buffer.push_str(KW_TYPE_UINT8_STR),
PTV::UInt16 => buffer.push_str(KW_TYPE_UINT16_STR),
PTV::UInt32 => buffer.push_str(KW_TYPE_UINT32_STR),
PTV::UInt64 => buffer.push_str(KW_TYPE_UINT64_STR),
PTV::SInt8 => buffer.push_str(KW_TYPE_SINT8_STR),
PTV::SInt16 => buffer.push_str(KW_TYPE_SINT16_STR),
PTV::SInt32 => buffer.push_str(KW_TYPE_SINT32_STR),
PTV::SInt64 => buffer.push_str(KW_TYPE_SINT64_STR),
PTV::Character => buffer.push_str(KW_TYPE_CHAR_STR),
PTV::String => buffer.push_str(KW_TYPE_STRING_STR),
PTV::IntegerLiteral => buffer.push_str("int_literal"),
PTV::Inferred => buffer.push_str(KW_TYPE_INFERRED_STR),
PTV::Array => {
idx = serialize_variant(buffer, heap, parser_type, idx + 1);
buffer.push_str("[]");
},
PTV::Input => {
buffer.push_str(KW_TYPE_IN_PORT_STR);
buffer.push('<');
idx = serialize_variant(buffer, heap, parser_type, idx + 1);
buffer.push('>');
},
PTV::Output => {
buffer.push_str(KW_TYPE_OUT_PORT_STR);
buffer.push('<');
idx = serialize_variant(buffer, heap, parser_type, idx + 1);
buffer.push('>');
},
PTV::PolymorphicArgument(definition_id, poly_idx) => {
let definition = &heap[*definition_id];
let poly_arg = &definition.poly_vars()[*poly_idx as usize];
buffer.push_str(poly_arg.value.as_str());
},
PTV::Definition(definition_id, num_embedded) => {
let definition = &heap[*definition_id];
buffer.push_str(definition.identifier().value.as_str());
let num_embedded = *num_embedded;
if num_embedded != 0 {
buffer.push('<');
for embedded_idx in 0..num_embedded {
if embedded_idx != 0 {
buffer.push(',');
}
idx = serialize_variant(buffer, heap, parser_type, idx + 1);
}
buffer.push('>');
}
}
}
idx
}
serialize_variant(buffer, heap, parser_type, 0);
}
fn serialize_concrete_type(buffer: &mut String, heap: &Heap, def: DefinitionId, concrete: &ConcreteType) {
// Retrieve polymorphic variables
let poly_vars = heap[def].poly_vars();
fn write_bytes(buffer: &mut String, bytes: &[u8]) {
let utf8 = String::from_utf8_lossy(bytes);
buffer.push_str(&utf8);
}
fn serialize_recursive(
buffer: &mut String, heap: &Heap, poly_vars: &Vec<Identifier>, concrete: &ConcreteType, mut idx: usize
) -> usize {
use ConcreteTypePart as CTP;
let part = &concrete.parts[idx];
match part {
CTP::Void => buffer.push_str("void"),
CTP::Message => write_bytes(buffer, KW_TYPE_MESSAGE),
CTP::Bool => write_bytes(buffer, KW_TYPE_BOOL),
CTP::UInt8 => write_bytes(buffer, KW_TYPE_UINT8),
CTP::UInt16 => write_bytes(buffer, KW_TYPE_UINT16),
CTP::UInt32 => write_bytes(buffer, KW_TYPE_UINT32),
CTP::UInt64 => write_bytes(buffer, KW_TYPE_UINT64),
CTP::SInt8 => write_bytes(buffer, KW_TYPE_SINT8),
CTP::SInt16 => write_bytes(buffer, KW_TYPE_SINT16),
CTP::SInt32 => write_bytes(buffer, KW_TYPE_SINT32),
CTP::SInt64 => write_bytes(buffer, KW_TYPE_SINT64),
CTP::Character => write_bytes(buffer, KW_TYPE_CHAR),
CTP::String => write_bytes(buffer, KW_TYPE_STRING),
CTP::Array => {
idx = serialize_recursive(buffer, heap, poly_vars, concrete, idx + 1);
buffer.push_str("[]");
},
CTP::Slice => {
idx = serialize_recursive(buffer, heap, poly_vars, concrete, idx + 1);
buffer.push_str("[..]");
},
CTP::Input => {
write_bytes(buffer, KW_TYPE_IN_PORT);
buffer.push('<');
idx = serialize_recursive(buffer, heap, poly_vars, concrete, idx + 1);
buffer.push('>');
},
CTP::Output => {
write_bytes(buffer, KW_TYPE_OUT_PORT);
buffer.push('<');
idx = serialize_recursive(buffer, heap, poly_vars, concrete, idx + 1);
buffer.push('>');
},
CTP::Instance(definition_id, num_sub) |
CTP::Function(definition_id, num_sub) |
CTP::Component(definition_id, num_sub) => {
let definition_name = heap[*definition_id].identifier();
buffer.push_str(definition_name.value.as_str());
if *num_sub != 0 {
buffer.push('<');
for sub_idx in 0..*num_sub {
if sub_idx != 0 { buffer.push(','); }
idx = serialize_recursive(buffer, heap, poly_vars, concrete, idx + 1);
}
buffer.push('>');
}
},
}
idx
}
serialize_recursive(buffer, heap, poly_vars, concrete, 0);
}
fn seek_def_in_modules<'a>(heap: &Heap, modules: &'a [Module], def_id: DefinitionId) -> Option<&'a Module> {
for module in modules {
let root = &heap.protocol_descriptions[module.root_id];
for definition in &root.definitions {
if *definition == def_id {
return Some(module)
}
}
}
None
}
fn seek_stmt<F: Fn(&Statement) -> bool>(heap: &Heap, start: StatementId, f: &F) -> Option<StatementId> {
let stmt = &heap[start];
if f(stmt) { return Some(start); }
// This statement wasn't it, try to recurse
let matched = match stmt {
Statement::Block(block) => {
for sub_id in &block.statements {
if let Some(id) = seek_stmt(heap, *sub_id, f) {
return Some(id);
}
}
None
},
Statement::Labeled(stmt) => seek_stmt(heap, stmt.body, f),
Statement::If(stmt) => {
if let Some(id) = seek_stmt(heap, stmt.true_body.upcast(), f) {
return Some(id);
} else if let Some(false_body) = stmt.false_body {
if let Some(id) = seek_stmt(heap, false_body.upcast(), f) {
return Some(id);
}
}
None
},
Statement::While(stmt) => seek_stmt(heap, stmt.body.upcast(), f),
Statement::Synchronous(stmt) => seek_stmt(heap, stmt.body.upcast(), f),
_ => None
};
matched
}
fn seek_expr_in_expr<F: Fn(&Expression) -> bool>(heap: &Heap, start: ExpressionId, f: &F) -> Option<ExpressionId> {
let expr = &heap[start];
if f(expr) { return Some(start); }
match expr {
Expression::Assignment(expr) => {
None
.or_else(|| seek_expr_in_expr(heap, expr.left, f))
.or_else(|| seek_expr_in_expr(heap, expr.right, f))
},
Expression::Binding(expr) => {
None
.or_else(|| seek_expr_in_expr(heap, expr.bound_to, f))
.or_else(|| seek_expr_in_expr(heap, expr.bound_from, f))
}
Expression::Conditional(expr) => {
None
.or_else(|| seek_expr_in_expr(heap, expr.test, f))
.or_else(|| seek_expr_in_expr(heap, expr.true_expression, f))
.or_else(|| seek_expr_in_expr(heap, expr.false_expression, f))
},
Expression::Binary(expr) => {
None
.or_else(|| seek_expr_in_expr(heap, expr.left, f))
.or_else(|| seek_expr_in_expr(heap, expr.right, f))
},
Expression::Unary(expr) => {
seek_expr_in_expr(heap, expr.expression, f)
},
Expression::Indexing(expr) => {
None
.or_else(|| seek_expr_in_expr(heap, expr.subject, f))
.or_else(|| seek_expr_in_expr(heap, expr.index, f))
},
Expression::Slicing(expr) => {
None
.or_else(|| seek_expr_in_expr(heap, expr.subject, f))
.or_else(|| seek_expr_in_expr(heap, expr.from_index, f))
.or_else(|| seek_expr_in_expr(heap, expr.to_index, f))
},
Expression::Select(expr) => {
seek_expr_in_expr(heap, expr.subject, f)
},
Expression::Literal(expr) => {
if let Literal::Struct(lit) = &expr.value {
for field in &lit.fields {
if let Some(id) = seek_expr_in_expr(heap, field.value, f) {
return Some(id)
}
}
} else if let Literal::Array(elements) = &expr.value {
for element in elements {
if let Some(id) = seek_expr_in_expr(heap, *element, f) {
return Some(id)
}
}
}
None
},
Expression::Cast(expr) => {
seek_expr_in_expr(heap, expr.subject, f)
}
Expression::Call(expr) => {
for arg in &expr.arguments {
if let Some(id) = seek_expr_in_expr(heap, *arg, f) {
return Some(id)
}
}
None
},
Expression::Variable(_expr) => {
None
}
}
}
fn seek_expr_in_stmt<F: Fn(&Expression) -> bool>(heap: &Heap, start: StatementId, f: &F) -> Option<ExpressionId> {
let stmt = &heap[start];
match stmt {
Statement::Block(stmt) => {
for stmt_id in &stmt.statements {
if let Some(id) = seek_expr_in_stmt(heap, *stmt_id, f) {
return Some(id)
}
}
None
},
Statement::Labeled(stmt) => {
seek_expr_in_stmt(heap, stmt.body, f)
},
Statement::If(stmt) => {
None
.or_else(|| seek_expr_in_expr(heap, stmt.test, f))
.or_else(|| seek_expr_in_stmt(heap, stmt.true_body.upcast(), f))
.or_else(|| if let Some(false_body) = stmt.false_body {
seek_expr_in_stmt(heap, false_body.upcast(), f)
} else {
None
})
},
Statement::While(stmt) => {
None
.or_else(|| seek_expr_in_expr(heap, stmt.test, f))
.or_else(|| seek_expr_in_stmt(heap, stmt.body.upcast(), f))
},
Statement::Synchronous(stmt) => {
seek_expr_in_stmt(heap, stmt.body.upcast(), f)
},
Statement::Return(stmt) => {
for expr_id in &stmt.expressions {
if let Some(id) = seek_expr_in_expr(heap, *expr_id, f) {
return Some(id);
}
}
None
},
Statement::New(stmt) => {
seek_expr_in_expr(heap, stmt.expression.upcast(), f)
},
Statement::Expression(stmt) => {
seek_expr_in_expr(heap, stmt.expression, f)
},
_ => None
}
}
struct FakeRunContext{}
impl RunContext for FakeRunContext {
fn performed_put(&mut self, _port: PortId) -> bool {
unreachable!("'put' called in compiler testing code")
}
fn performed_get(&mut self, _port: PortId) -> Option<ValueGroup> {
unreachable!("'get' called in compiler testing code")
}
fn fires(&mut self, _port: PortId) -> Option<Value> {
unreachable!("'fires' called in compiler testing code")
}
fn performed_fork(&mut self) -> Option<bool> {
unreachable!("'fork' called in compiler testing code")
}
fn created_channel(&mut self) -> Option<(Value, Value)> {
unreachable!("channel created in compiler testing code")
}
}
|