How to use data class

Best Atoum code snippet using data

script_test.go

Source:script_test.go Github

copy

Full Screen

...7 "reflect"8 "testing"9 "github.com/btcsuite/btcd/wire"10)11// TestParseOpcode tests for opcode parsing with bad data templates.12func TestParseOpcode(t *testing.T) {13 // Deep copy the array and make one of the opcodes invalid by setting it14 // to the wrong length.15 fakeArray := opcodeArray16 fakeArray[OP_PUSHDATA4] = opcode{value: OP_PUSHDATA4,17 name: "OP_PUSHDATA4", length: -8, opfunc: opcodePushData}18 // This script would be fine if -8 was a valid length.19 _, err := parseScriptTemplate([]byte{OP_PUSHDATA4, 0x1, 0x00, 0x00,20 0x00, 0x00, 0x00, 0x00, 0x00}, &fakeArray)21 if err == nil {22 t.Errorf("no error with dodgy opcode array!")23 }24}25// TestUnparsingInvalidOpcodes tests for errors when unparsing invalid parsed26// opcodes.27func TestUnparsingInvalidOpcodes(t *testing.T) {28 tests := []struct {29 name string30 pop *parsedOpcode31 expectedErr error32 }{33 {34 name: "OP_FALSE",35 pop: &parsedOpcode{36 opcode: &opcodeArray[OP_FALSE],37 data: nil,38 },39 expectedErr: nil,40 },41 {42 name: "OP_FALSE long",43 pop: &parsedOpcode{44 opcode: &opcodeArray[OP_FALSE],45 data: make([]byte, 1),46 },47 expectedErr: scriptError(ErrInternal, ""),48 },49 {50 name: "OP_DATA_1 short",51 pop: &parsedOpcode{52 opcode: &opcodeArray[OP_DATA_1],53 data: nil,54 },55 expectedErr: scriptError(ErrInternal, ""),56 },57 {58 name: "OP_DATA_1",59 pop: &parsedOpcode{60 opcode: &opcodeArray[OP_DATA_1],61 data: make([]byte, 1),62 },63 expectedErr: nil,64 },65 {66 name: "OP_DATA_1 long",67 pop: &parsedOpcode{68 opcode: &opcodeArray[OP_DATA_1],69 data: make([]byte, 2),70 },71 expectedErr: scriptError(ErrInternal, ""),72 },73 {74 name: "OP_DATA_2 short",75 pop: &parsedOpcode{76 opcode: &opcodeArray[OP_DATA_2],77 data: make([]byte, 1),78 },79 expectedErr: scriptError(ErrInternal, ""),80 },81 {82 name: "OP_DATA_2",83 pop: &parsedOpcode{84 opcode: &opcodeArray[OP_DATA_2],85 data: make([]byte, 2),86 },87 expectedErr: nil,88 },89 {90 name: "OP_DATA_2 long",91 pop: &parsedOpcode{92 opcode: &opcodeArray[OP_DATA_2],93 data: make([]byte, 3),94 },95 expectedErr: scriptError(ErrInternal, ""),96 },97 {98 name: "OP_DATA_3 short",99 pop: &parsedOpcode{100 opcode: &opcodeArray[OP_DATA_3],101 data: make([]byte, 2),102 },103 expectedErr: scriptError(ErrInternal, ""),104 },105 {106 name: "OP_DATA_3",107 pop: &parsedOpcode{108 opcode: &opcodeArray[OP_DATA_3],109 data: make([]byte, 3),110 },111 expectedErr: nil,112 },113 {114 name: "OP_DATA_3 long",115 pop: &parsedOpcode{116 opcode: &opcodeArray[OP_DATA_3],117 data: make([]byte, 4),118 },119 expectedErr: scriptError(ErrInternal, ""),120 },121 {122 name: "OP_DATA_4 short",123 pop: &parsedOpcode{124 opcode: &opcodeArray[OP_DATA_4],125 data: make([]byte, 3),126 },127 expectedErr: scriptError(ErrInternal, ""),128 },129 {130 name: "OP_DATA_4",131 pop: &parsedOpcode{132 opcode: &opcodeArray[OP_DATA_4],133 data: make([]byte, 4),134 },135 expectedErr: nil,136 },137 {138 name: "OP_DATA_4 long",139 pop: &parsedOpcode{140 opcode: &opcodeArray[OP_DATA_4],141 data: make([]byte, 5),142 },143 expectedErr: scriptError(ErrInternal, ""),144 },145 {146 name: "OP_DATA_5 short",147 pop: &parsedOpcode{148 opcode: &opcodeArray[OP_DATA_5],149 data: make([]byte, 4),150 },151 expectedErr: scriptError(ErrInternal, ""),152 },153 {154 name: "OP_DATA_5",155 pop: &parsedOpcode{156 opcode: &opcodeArray[OP_DATA_5],157 data: make([]byte, 5),158 },159 expectedErr: nil,160 },161 {162 name: "OP_DATA_5 long",163 pop: &parsedOpcode{164 opcode: &opcodeArray[OP_DATA_5],165 data: make([]byte, 6),166 },167 expectedErr: scriptError(ErrInternal, ""),168 },169 {170 name: "OP_DATA_6 short",171 pop: &parsedOpcode{172 opcode: &opcodeArray[OP_DATA_6],173 data: make([]byte, 5),174 },175 expectedErr: scriptError(ErrInternal, ""),176 },177 {178 name: "OP_DATA_6",179 pop: &parsedOpcode{180 opcode: &opcodeArray[OP_DATA_6],181 data: make([]byte, 6),182 },183 expectedErr: nil,184 },185 {186 name: "OP_DATA_6 long",187 pop: &parsedOpcode{188 opcode: &opcodeArray[OP_DATA_6],189 data: make([]byte, 7),190 },191 expectedErr: scriptError(ErrInternal, ""),192 },193 {194 name: "OP_DATA_7 short",195 pop: &parsedOpcode{196 opcode: &opcodeArray[OP_DATA_7],197 data: make([]byte, 6),198 },199 expectedErr: scriptError(ErrInternal, ""),200 },201 {202 name: "OP_DATA_7",203 pop: &parsedOpcode{204 opcode: &opcodeArray[OP_DATA_7],205 data: make([]byte, 7),206 },207 expectedErr: nil,208 },209 {210 name: "OP_DATA_7 long",211 pop: &parsedOpcode{212 opcode: &opcodeArray[OP_DATA_7],213 data: make([]byte, 8),214 },215 expectedErr: scriptError(ErrInternal, ""),216 },217 {218 name: "OP_DATA_8 short",219 pop: &parsedOpcode{220 opcode: &opcodeArray[OP_DATA_8],221 data: make([]byte, 7),222 },223 expectedErr: scriptError(ErrInternal, ""),224 },225 {226 name: "OP_DATA_8",227 pop: &parsedOpcode{228 opcode: &opcodeArray[OP_DATA_8],229 data: make([]byte, 8),230 },231 expectedErr: nil,232 },233 {234 name: "OP_DATA_8 long",235 pop: &parsedOpcode{236 opcode: &opcodeArray[OP_DATA_8],237 data: make([]byte, 9),238 },239 expectedErr: scriptError(ErrInternal, ""),240 },241 {242 name: "OP_DATA_9 short",243 pop: &parsedOpcode{244 opcode: &opcodeArray[OP_DATA_9],245 data: make([]byte, 8),246 },247 expectedErr: scriptError(ErrInternal, ""),248 },249 {250 name: "OP_DATA_9",251 pop: &parsedOpcode{252 opcode: &opcodeArray[OP_DATA_9],253 data: make([]byte, 9),254 },255 expectedErr: nil,256 },257 {258 name: "OP_DATA_9 long",259 pop: &parsedOpcode{260 opcode: &opcodeArray[OP_DATA_9],261 data: make([]byte, 10),262 },263 expectedErr: scriptError(ErrInternal, ""),264 },265 {266 name: "OP_DATA_10 short",267 pop: &parsedOpcode{268 opcode: &opcodeArray[OP_DATA_10],269 data: make([]byte, 9),270 },271 expectedErr: scriptError(ErrInternal, ""),272 },273 {274 name: "OP_DATA_10",275 pop: &parsedOpcode{276 opcode: &opcodeArray[OP_DATA_10],277 data: make([]byte, 10),278 },279 expectedErr: nil,280 },281 {282 name: "OP_DATA_10 long",283 pop: &parsedOpcode{284 opcode: &opcodeArray[OP_DATA_10],285 data: make([]byte, 11),286 },287 expectedErr: scriptError(ErrInternal, ""),288 },289 {290 name: "OP_DATA_11 short",291 pop: &parsedOpcode{292 opcode: &opcodeArray[OP_DATA_11],293 data: make([]byte, 10),294 },295 expectedErr: scriptError(ErrInternal, ""),296 },297 {298 name: "OP_DATA_11",299 pop: &parsedOpcode{300 opcode: &opcodeArray[OP_DATA_11],301 data: make([]byte, 11),302 },303 expectedErr: nil,304 },305 {306 name: "OP_DATA_11 long",307 pop: &parsedOpcode{308 opcode: &opcodeArray[OP_DATA_11],309 data: make([]byte, 12),310 },311 expectedErr: scriptError(ErrInternal, ""),312 },313 {314 name: "OP_DATA_12 short",315 pop: &parsedOpcode{316 opcode: &opcodeArray[OP_DATA_12],317 data: make([]byte, 11),318 },319 expectedErr: scriptError(ErrInternal, ""),320 },321 {322 name: "OP_DATA_12",323 pop: &parsedOpcode{324 opcode: &opcodeArray[OP_DATA_12],325 data: make([]byte, 12),326 },327 expectedErr: nil,328 },329 {330 name: "OP_DATA_12 long",331 pop: &parsedOpcode{332 opcode: &opcodeArray[OP_DATA_12],333 data: make([]byte, 13),334 },335 expectedErr: scriptError(ErrInternal, ""),336 },337 {338 name: "OP_DATA_13 short",339 pop: &parsedOpcode{340 opcode: &opcodeArray[OP_DATA_13],341 data: make([]byte, 12),342 },343 expectedErr: scriptError(ErrInternal, ""),344 },345 {346 name: "OP_DATA_13",347 pop: &parsedOpcode{348 opcode: &opcodeArray[OP_DATA_13],349 data: make([]byte, 13),350 },351 expectedErr: nil,352 },353 {354 name: "OP_DATA_13 long",355 pop: &parsedOpcode{356 opcode: &opcodeArray[OP_DATA_13],357 data: make([]byte, 14),358 },359 expectedErr: scriptError(ErrInternal, ""),360 },361 {362 name: "OP_DATA_14 short",363 pop: &parsedOpcode{364 opcode: &opcodeArray[OP_DATA_14],365 data: make([]byte, 13),366 },367 expectedErr: scriptError(ErrInternal, ""),368 },369 {370 name: "OP_DATA_14",371 pop: &parsedOpcode{372 opcode: &opcodeArray[OP_DATA_14],373 data: make([]byte, 14),374 },375 expectedErr: nil,376 },377 {378 name: "OP_DATA_14 long",379 pop: &parsedOpcode{380 opcode: &opcodeArray[OP_DATA_14],381 data: make([]byte, 15),382 },383 expectedErr: scriptError(ErrInternal, ""),384 },385 {386 name: "OP_DATA_15 short",387 pop: &parsedOpcode{388 opcode: &opcodeArray[OP_DATA_15],389 data: make([]byte, 14),390 },391 expectedErr: scriptError(ErrInternal, ""),392 },393 {394 name: "OP_DATA_15",395 pop: &parsedOpcode{396 opcode: &opcodeArray[OP_DATA_15],397 data: make([]byte, 15),398 },399 expectedErr: nil,400 },401 {402 name: "OP_DATA_15 long",403 pop: &parsedOpcode{404 opcode: &opcodeArray[OP_DATA_15],405 data: make([]byte, 16),406 },407 expectedErr: scriptError(ErrInternal, ""),408 },409 {410 name: "OP_DATA_16 short",411 pop: &parsedOpcode{412 opcode: &opcodeArray[OP_DATA_16],413 data: make([]byte, 15),414 },415 expectedErr: scriptError(ErrInternal, ""),416 },417 {418 name: "OP_DATA_16",419 pop: &parsedOpcode{420 opcode: &opcodeArray[OP_DATA_16],421 data: make([]byte, 16),422 },423 expectedErr: nil,424 },425 {426 name: "OP_DATA_16 long",427 pop: &parsedOpcode{428 opcode: &opcodeArray[OP_DATA_16],429 data: make([]byte, 17),430 },431 expectedErr: scriptError(ErrInternal, ""),432 },433 {434 name: "OP_DATA_17 short",435 pop: &parsedOpcode{436 opcode: &opcodeArray[OP_DATA_17],437 data: make([]byte, 16),438 },439 expectedErr: scriptError(ErrInternal, ""),440 },441 {442 name: "OP_DATA_17",443 pop: &parsedOpcode{444 opcode: &opcodeArray[OP_DATA_17],445 data: make([]byte, 17),446 },447 expectedErr: nil,448 },449 {450 name: "OP_DATA_17 long",451 pop: &parsedOpcode{452 opcode: &opcodeArray[OP_DATA_17],453 data: make([]byte, 18),454 },455 expectedErr: scriptError(ErrInternal, ""),456 },457 {458 name: "OP_DATA_18 short",459 pop: &parsedOpcode{460 opcode: &opcodeArray[OP_DATA_18],461 data: make([]byte, 17),462 },463 expectedErr: scriptError(ErrInternal, ""),464 },465 {466 name: "OP_DATA_18",467 pop: &parsedOpcode{468 opcode: &opcodeArray[OP_DATA_18],469 data: make([]byte, 18),470 },471 expectedErr: nil,472 },473 {474 name: "OP_DATA_18 long",475 pop: &parsedOpcode{476 opcode: &opcodeArray[OP_DATA_18],477 data: make([]byte, 19),478 },479 expectedErr: scriptError(ErrInternal, ""),480 },481 {482 name: "OP_DATA_19 short",483 pop: &parsedOpcode{484 opcode: &opcodeArray[OP_DATA_19],485 data: make([]byte, 18),486 },487 expectedErr: scriptError(ErrInternal, ""),488 },489 {490 name: "OP_DATA_19",491 pop: &parsedOpcode{492 opcode: &opcodeArray[OP_DATA_19],493 data: make([]byte, 19),494 },495 expectedErr: nil,496 },497 {498 name: "OP_DATA_19 long",499 pop: &parsedOpcode{500 opcode: &opcodeArray[OP_DATA_19],501 data: make([]byte, 20),502 },503 expectedErr: scriptError(ErrInternal, ""),504 },505 {506 name: "OP_DATA_20 short",507 pop: &parsedOpcode{508 opcode: &opcodeArray[OP_DATA_20],509 data: make([]byte, 19),510 },511 expectedErr: scriptError(ErrInternal, ""),512 },513 {514 name: "OP_DATA_20",515 pop: &parsedOpcode{516 opcode: &opcodeArray[OP_DATA_20],517 data: make([]byte, 20),518 },519 expectedErr: nil,520 },521 {522 name: "OP_DATA_20 long",523 pop: &parsedOpcode{524 opcode: &opcodeArray[OP_DATA_20],525 data: make([]byte, 21),526 },527 expectedErr: scriptError(ErrInternal, ""),528 },529 {530 name: "OP_DATA_21 short",531 pop: &parsedOpcode{532 opcode: &opcodeArray[OP_DATA_21],533 data: make([]byte, 20),534 },535 expectedErr: scriptError(ErrInternal, ""),536 },537 {538 name: "OP_DATA_21",539 pop: &parsedOpcode{540 opcode: &opcodeArray[OP_DATA_21],541 data: make([]byte, 21),542 },543 expectedErr: nil,544 },545 {546 name: "OP_DATA_21 long",547 pop: &parsedOpcode{548 opcode: &opcodeArray[OP_DATA_21],549 data: make([]byte, 22),550 },551 expectedErr: scriptError(ErrInternal, ""),552 },553 {554 name: "OP_DATA_22 short",555 pop: &parsedOpcode{556 opcode: &opcodeArray[OP_DATA_22],557 data: make([]byte, 21),558 },559 expectedErr: scriptError(ErrInternal, ""),560 },561 {562 name: "OP_DATA_22",563 pop: &parsedOpcode{564 opcode: &opcodeArray[OP_DATA_22],565 data: make([]byte, 22),566 },567 expectedErr: nil,568 },569 {570 name: "OP_DATA_22 long",571 pop: &parsedOpcode{572 opcode: &opcodeArray[OP_DATA_22],573 data: make([]byte, 23),574 },575 expectedErr: scriptError(ErrInternal, ""),576 },577 {578 name: "OP_DATA_23 short",579 pop: &parsedOpcode{580 opcode: &opcodeArray[OP_DATA_23],581 data: make([]byte, 22),582 },583 expectedErr: scriptError(ErrInternal, ""),584 },585 {586 name: "OP_DATA_23",587 pop: &parsedOpcode{588 opcode: &opcodeArray[OP_DATA_23],589 data: make([]byte, 23),590 },591 expectedErr: nil,592 },593 {594 name: "OP_DATA_23 long",595 pop: &parsedOpcode{596 opcode: &opcodeArray[OP_DATA_23],597 data: make([]byte, 24),598 },599 expectedErr: scriptError(ErrInternal, ""),600 },601 {602 name: "OP_DATA_24 short",603 pop: &parsedOpcode{604 opcode: &opcodeArray[OP_DATA_24],605 data: make([]byte, 23),606 },607 expectedErr: scriptError(ErrInternal, ""),608 },609 {610 name: "OP_DATA_24",611 pop: &parsedOpcode{612 opcode: &opcodeArray[OP_DATA_24],613 data: make([]byte, 24),614 },615 expectedErr: nil,616 },617 {618 name: "OP_DATA_24 long",619 pop: &parsedOpcode{620 opcode: &opcodeArray[OP_DATA_24],621 data: make([]byte, 25),622 },623 expectedErr: scriptError(ErrInternal, ""),624 },625 {626 name: "OP_DATA_25 short",627 pop: &parsedOpcode{628 opcode: &opcodeArray[OP_DATA_25],629 data: make([]byte, 24),630 },631 expectedErr: scriptError(ErrInternal, ""),632 },633 {634 name: "OP_DATA_25",635 pop: &parsedOpcode{636 opcode: &opcodeArray[OP_DATA_25],637 data: make([]byte, 25),638 },639 expectedErr: nil,640 },641 {642 name: "OP_DATA_25 long",643 pop: &parsedOpcode{644 opcode: &opcodeArray[OP_DATA_25],645 data: make([]byte, 26),646 },647 expectedErr: scriptError(ErrInternal, ""),648 },649 {650 name: "OP_DATA_26 short",651 pop: &parsedOpcode{652 opcode: &opcodeArray[OP_DATA_26],653 data: make([]byte, 25),654 },655 expectedErr: scriptError(ErrInternal, ""),656 },657 {658 name: "OP_DATA_26",659 pop: &parsedOpcode{660 opcode: &opcodeArray[OP_DATA_26],661 data: make([]byte, 26),662 },663 expectedErr: nil,664 },665 {666 name: "OP_DATA_26 long",667 pop: &parsedOpcode{668 opcode: &opcodeArray[OP_DATA_26],669 data: make([]byte, 27),670 },671 expectedErr: scriptError(ErrInternal, ""),672 },673 {674 name: "OP_DATA_27 short",675 pop: &parsedOpcode{676 opcode: &opcodeArray[OP_DATA_27],677 data: make([]byte, 26),678 },679 expectedErr: scriptError(ErrInternal, ""),680 },681 {682 name: "OP_DATA_27",683 pop: &parsedOpcode{684 opcode: &opcodeArray[OP_DATA_27],685 data: make([]byte, 27),686 },687 expectedErr: nil,688 },689 {690 name: "OP_DATA_27 long",691 pop: &parsedOpcode{692 opcode: &opcodeArray[OP_DATA_27],693 data: make([]byte, 28),694 },695 expectedErr: scriptError(ErrInternal, ""),696 },697 {698 name: "OP_DATA_28 short",699 pop: &parsedOpcode{700 opcode: &opcodeArray[OP_DATA_28],701 data: make([]byte, 27),702 },703 expectedErr: scriptError(ErrInternal, ""),704 },705 {706 name: "OP_DATA_28",707 pop: &parsedOpcode{708 opcode: &opcodeArray[OP_DATA_28],709 data: make([]byte, 28),710 },711 expectedErr: nil,712 },713 {714 name: "OP_DATA_28 long",715 pop: &parsedOpcode{716 opcode: &opcodeArray[OP_DATA_28],717 data: make([]byte, 29),718 },719 expectedErr: scriptError(ErrInternal, ""),720 },721 {722 name: "OP_DATA_29 short",723 pop: &parsedOpcode{724 opcode: &opcodeArray[OP_DATA_29],725 data: make([]byte, 28),726 },727 expectedErr: scriptError(ErrInternal, ""),728 },729 {730 name: "OP_DATA_29",731 pop: &parsedOpcode{732 opcode: &opcodeArray[OP_DATA_29],733 data: make([]byte, 29),734 },735 expectedErr: nil,736 },737 {738 name: "OP_DATA_29 long",739 pop: &parsedOpcode{740 opcode: &opcodeArray[OP_DATA_29],741 data: make([]byte, 30),742 },743 expectedErr: scriptError(ErrInternal, ""),744 },745 {746 name: "OP_DATA_30 short",747 pop: &parsedOpcode{748 opcode: &opcodeArray[OP_DATA_30],749 data: make([]byte, 29),750 },751 expectedErr: scriptError(ErrInternal, ""),752 },753 {754 name: "OP_DATA_30",755 pop: &parsedOpcode{756 opcode: &opcodeArray[OP_DATA_30],757 data: make([]byte, 30),758 },759 expectedErr: nil,760 },761 {762 name: "OP_DATA_30 long",763 pop: &parsedOpcode{764 opcode: &opcodeArray[OP_DATA_30],765 data: make([]byte, 31),766 },767 expectedErr: scriptError(ErrInternal, ""),768 },769 {770 name: "OP_DATA_31 short",771 pop: &parsedOpcode{772 opcode: &opcodeArray[OP_DATA_31],773 data: make([]byte, 30),774 },775 expectedErr: scriptError(ErrInternal, ""),776 },777 {778 name: "OP_DATA_31",779 pop: &parsedOpcode{780 opcode: &opcodeArray[OP_DATA_31],781 data: make([]byte, 31),782 },783 expectedErr: nil,784 },785 {786 name: "OP_DATA_31 long",787 pop: &parsedOpcode{788 opcode: &opcodeArray[OP_DATA_31],789 data: make([]byte, 32),790 },791 expectedErr: scriptError(ErrInternal, ""),792 },793 {794 name: "OP_DATA_32 short",795 pop: &parsedOpcode{796 opcode: &opcodeArray[OP_DATA_32],797 data: make([]byte, 31),798 },799 expectedErr: scriptError(ErrInternal, ""),800 },801 {802 name: "OP_DATA_32",803 pop: &parsedOpcode{804 opcode: &opcodeArray[OP_DATA_32],805 data: make([]byte, 32),806 },807 expectedErr: nil,808 },809 {810 name: "OP_DATA_32 long",811 pop: &parsedOpcode{812 opcode: &opcodeArray[OP_DATA_32],813 data: make([]byte, 33),814 },815 expectedErr: scriptError(ErrInternal, ""),816 },817 {818 name: "OP_DATA_33 short",819 pop: &parsedOpcode{820 opcode: &opcodeArray[OP_DATA_33],821 data: make([]byte, 32),822 },823 expectedErr: scriptError(ErrInternal, ""),824 },825 {826 name: "OP_DATA_33",827 pop: &parsedOpcode{828 opcode: &opcodeArray[OP_DATA_33],829 data: make([]byte, 33),830 },831 expectedErr: nil,832 },833 {834 name: "OP_DATA_33 long",835 pop: &parsedOpcode{836 opcode: &opcodeArray[OP_DATA_33],837 data: make([]byte, 34),838 },839 expectedErr: scriptError(ErrInternal, ""),840 },841 {842 name: "OP_DATA_34 short",843 pop: &parsedOpcode{844 opcode: &opcodeArray[OP_DATA_34],845 data: make([]byte, 33),846 },847 expectedErr: scriptError(ErrInternal, ""),848 },849 {850 name: "OP_DATA_34",851 pop: &parsedOpcode{852 opcode: &opcodeArray[OP_DATA_34],853 data: make([]byte, 34),854 },855 expectedErr: nil,856 },857 {858 name: "OP_DATA_34 long",859 pop: &parsedOpcode{860 opcode: &opcodeArray[OP_DATA_34],861 data: make([]byte, 35),862 },863 expectedErr: scriptError(ErrInternal, ""),864 },865 {866 name: "OP_DATA_35 short",867 pop: &parsedOpcode{868 opcode: &opcodeArray[OP_DATA_35],869 data: make([]byte, 34),870 },871 expectedErr: scriptError(ErrInternal, ""),872 },873 {874 name: "OP_DATA_35",875 pop: &parsedOpcode{876 opcode: &opcodeArray[OP_DATA_35],877 data: make([]byte, 35),878 },879 expectedErr: nil,880 },881 {882 name: "OP_DATA_35 long",883 pop: &parsedOpcode{884 opcode: &opcodeArray[OP_DATA_35],885 data: make([]byte, 36),886 },887 expectedErr: scriptError(ErrInternal, ""),888 },889 {890 name: "OP_DATA_36 short",891 pop: &parsedOpcode{892 opcode: &opcodeArray[OP_DATA_36],893 data: make([]byte, 35),894 },895 expectedErr: scriptError(ErrInternal, ""),896 },897 {898 name: "OP_DATA_36",899 pop: &parsedOpcode{900 opcode: &opcodeArray[OP_DATA_36],901 data: make([]byte, 36),902 },903 expectedErr: nil,904 },905 {906 name: "OP_DATA_36 long",907 pop: &parsedOpcode{908 opcode: &opcodeArray[OP_DATA_36],909 data: make([]byte, 37),910 },911 expectedErr: scriptError(ErrInternal, ""),912 },913 {914 name: "OP_DATA_37 short",915 pop: &parsedOpcode{916 opcode: &opcodeArray[OP_DATA_37],917 data: make([]byte, 36),918 },919 expectedErr: scriptError(ErrInternal, ""),920 },921 {922 name: "OP_DATA_37",923 pop: &parsedOpcode{924 opcode: &opcodeArray[OP_DATA_37],925 data: make([]byte, 37),926 },927 expectedErr: nil,928 },929 {930 name: "OP_DATA_37 long",931 pop: &parsedOpcode{932 opcode: &opcodeArray[OP_DATA_37],933 data: make([]byte, 38),934 },935 expectedErr: scriptError(ErrInternal, ""),936 },937 {938 name: "OP_DATA_38 short",939 pop: &parsedOpcode{940 opcode: &opcodeArray[OP_DATA_38],941 data: make([]byte, 37),942 },943 expectedErr: scriptError(ErrInternal, ""),944 },945 {946 name: "OP_DATA_38",947 pop: &parsedOpcode{948 opcode: &opcodeArray[OP_DATA_38],949 data: make([]byte, 38),950 },951 expectedErr: nil,952 },953 {954 name: "OP_DATA_38 long",955 pop: &parsedOpcode{956 opcode: &opcodeArray[OP_DATA_38],957 data: make([]byte, 39),958 },959 expectedErr: scriptError(ErrInternal, ""),960 },961 {962 name: "OP_DATA_39 short",963 pop: &parsedOpcode{964 opcode: &opcodeArray[OP_DATA_39],965 data: make([]byte, 38),966 },967 expectedErr: scriptError(ErrInternal, ""),968 },969 {970 name: "OP_DATA_39",971 pop: &parsedOpcode{972 opcode: &opcodeArray[OP_DATA_39],973 data: make([]byte, 39),974 },975 expectedErr: nil,976 },977 {978 name: "OP_DATA_39 long",979 pop: &parsedOpcode{980 opcode: &opcodeArray[OP_DATA_39],981 data: make([]byte, 40),982 },983 expectedErr: scriptError(ErrInternal, ""),984 },985 {986 name: "OP_DATA_40 short",987 pop: &parsedOpcode{988 opcode: &opcodeArray[OP_DATA_40],989 data: make([]byte, 39),990 },991 expectedErr: scriptError(ErrInternal, ""),992 },993 {994 name: "OP_DATA_40",995 pop: &parsedOpcode{996 opcode: &opcodeArray[OP_DATA_40],997 data: make([]byte, 40),998 },999 expectedErr: nil,1000 },1001 {1002 name: "OP_DATA_40 long",1003 pop: &parsedOpcode{1004 opcode: &opcodeArray[OP_DATA_40],1005 data: make([]byte, 41),1006 },1007 expectedErr: scriptError(ErrInternal, ""),1008 },1009 {1010 name: "OP_DATA_41 short",1011 pop: &parsedOpcode{1012 opcode: &opcodeArray[OP_DATA_41],1013 data: make([]byte, 40),1014 },1015 expectedErr: scriptError(ErrInternal, ""),1016 },1017 {1018 name: "OP_DATA_41",1019 pop: &parsedOpcode{1020 opcode: &opcodeArray[OP_DATA_41],1021 data: make([]byte, 41),1022 },1023 expectedErr: nil,1024 },1025 {1026 name: "OP_DATA_41 long",1027 pop: &parsedOpcode{1028 opcode: &opcodeArray[OP_DATA_41],1029 data: make([]byte, 42),1030 },1031 expectedErr: scriptError(ErrInternal, ""),1032 },1033 {1034 name: "OP_DATA_42 short",1035 pop: &parsedOpcode{1036 opcode: &opcodeArray[OP_DATA_42],1037 data: make([]byte, 41),1038 },1039 expectedErr: scriptError(ErrInternal, ""),1040 },1041 {1042 name: "OP_DATA_42",1043 pop: &parsedOpcode{1044 opcode: &opcodeArray[OP_DATA_42],1045 data: make([]byte, 42),1046 },1047 expectedErr: nil,1048 },1049 {1050 name: "OP_DATA_42 long",1051 pop: &parsedOpcode{1052 opcode: &opcodeArray[OP_DATA_42],1053 data: make([]byte, 43),1054 },1055 expectedErr: scriptError(ErrInternal, ""),1056 },1057 {1058 name: "OP_DATA_43 short",1059 pop: &parsedOpcode{1060 opcode: &opcodeArray[OP_DATA_43],1061 data: make([]byte, 42),1062 },1063 expectedErr: scriptError(ErrInternal, ""),1064 },1065 {1066 name: "OP_DATA_43",1067 pop: &parsedOpcode{1068 opcode: &opcodeArray[OP_DATA_43],1069 data: make([]byte, 43),1070 },1071 expectedErr: nil,1072 },1073 {1074 name: "OP_DATA_43 long",1075 pop: &parsedOpcode{1076 opcode: &opcodeArray[OP_DATA_43],1077 data: make([]byte, 44),1078 },1079 expectedErr: scriptError(ErrInternal, ""),1080 },1081 {1082 name: "OP_DATA_44 short",1083 pop: &parsedOpcode{1084 opcode: &opcodeArray[OP_DATA_44],1085 data: make([]byte, 43),1086 },1087 expectedErr: scriptError(ErrInternal, ""),1088 },1089 {1090 name: "OP_DATA_44",1091 pop: &parsedOpcode{1092 opcode: &opcodeArray[OP_DATA_44],1093 data: make([]byte, 44),1094 },1095 expectedErr: nil,1096 },1097 {1098 name: "OP_DATA_44 long",1099 pop: &parsedOpcode{1100 opcode: &opcodeArray[OP_DATA_44],1101 data: make([]byte, 45),1102 },1103 expectedErr: scriptError(ErrInternal, ""),1104 },1105 {1106 name: "OP_DATA_45 short",1107 pop: &parsedOpcode{1108 opcode: &opcodeArray[OP_DATA_45],1109 data: make([]byte, 44),1110 },1111 expectedErr: scriptError(ErrInternal, ""),1112 },1113 {1114 name: "OP_DATA_45",1115 pop: &parsedOpcode{1116 opcode: &opcodeArray[OP_DATA_45],1117 data: make([]byte, 45),1118 },1119 expectedErr: nil,1120 },1121 {1122 name: "OP_DATA_45 long",1123 pop: &parsedOpcode{1124 opcode: &opcodeArray[OP_DATA_45],1125 data: make([]byte, 46),1126 },1127 expectedErr: scriptError(ErrInternal, ""),1128 },1129 {1130 name: "OP_DATA_46 short",1131 pop: &parsedOpcode{1132 opcode: &opcodeArray[OP_DATA_46],1133 data: make([]byte, 45),1134 },1135 expectedErr: scriptError(ErrInternal, ""),1136 },1137 {1138 name: "OP_DATA_46",1139 pop: &parsedOpcode{1140 opcode: &opcodeArray[OP_DATA_46],1141 data: make([]byte, 46),1142 },1143 expectedErr: nil,1144 },1145 {1146 name: "OP_DATA_46 long",1147 pop: &parsedOpcode{1148 opcode: &opcodeArray[OP_DATA_46],1149 data: make([]byte, 47),1150 },1151 expectedErr: scriptError(ErrInternal, ""),1152 },1153 {1154 name: "OP_DATA_47 short",1155 pop: &parsedOpcode{1156 opcode: &opcodeArray[OP_DATA_47],1157 data: make([]byte, 46),1158 },1159 expectedErr: scriptError(ErrInternal, ""),1160 },1161 {1162 name: "OP_DATA_47",1163 pop: &parsedOpcode{1164 opcode: &opcodeArray[OP_DATA_47],1165 data: make([]byte, 47),1166 },1167 expectedErr: nil,1168 },1169 {1170 name: "OP_DATA_47 long",1171 pop: &parsedOpcode{1172 opcode: &opcodeArray[OP_DATA_47],1173 data: make([]byte, 48),1174 },1175 expectedErr: scriptError(ErrInternal, ""),1176 },1177 {1178 name: "OP_DATA_48 short",1179 pop: &parsedOpcode{1180 opcode: &opcodeArray[OP_DATA_48],1181 data: make([]byte, 47),1182 },1183 expectedErr: scriptError(ErrInternal, ""),1184 },1185 {1186 name: "OP_DATA_48",1187 pop: &parsedOpcode{1188 opcode: &opcodeArray[OP_DATA_48],1189 data: make([]byte, 48),1190 },1191 expectedErr: nil,1192 },1193 {1194 name: "OP_DATA_48 long",1195 pop: &parsedOpcode{1196 opcode: &opcodeArray[OP_DATA_48],1197 data: make([]byte, 49),1198 },1199 expectedErr: scriptError(ErrInternal, ""),1200 },1201 {1202 name: "OP_DATA_49 short",1203 pop: &parsedOpcode{1204 opcode: &opcodeArray[OP_DATA_49],1205 data: make([]byte, 48),1206 },1207 expectedErr: scriptError(ErrInternal, ""),1208 },1209 {1210 name: "OP_DATA_49",1211 pop: &parsedOpcode{1212 opcode: &opcodeArray[OP_DATA_49],1213 data: make([]byte, 49),1214 },1215 expectedErr: nil,1216 },1217 {1218 name: "OP_DATA_49 long",1219 pop: &parsedOpcode{1220 opcode: &opcodeArray[OP_DATA_49],1221 data: make([]byte, 50),1222 },1223 expectedErr: scriptError(ErrInternal, ""),1224 },1225 {1226 name: "OP_DATA_50 short",1227 pop: &parsedOpcode{1228 opcode: &opcodeArray[OP_DATA_50],1229 data: make([]byte, 49),1230 },1231 expectedErr: scriptError(ErrInternal, ""),1232 },1233 {1234 name: "OP_DATA_50",1235 pop: &parsedOpcode{1236 opcode: &opcodeArray[OP_DATA_50],1237 data: make([]byte, 50),1238 },1239 expectedErr: nil,1240 },1241 {1242 name: "OP_DATA_50 long",1243 pop: &parsedOpcode{1244 opcode: &opcodeArray[OP_DATA_50],1245 data: make([]byte, 51),1246 },1247 expectedErr: scriptError(ErrInternal, ""),1248 },1249 {1250 name: "OP_DATA_51 short",1251 pop: &parsedOpcode{1252 opcode: &opcodeArray[OP_DATA_51],1253 data: make([]byte, 50),1254 },1255 expectedErr: scriptError(ErrInternal, ""),1256 },1257 {1258 name: "OP_DATA_51",1259 pop: &parsedOpcode{1260 opcode: &opcodeArray[OP_DATA_51],1261 data: make([]byte, 51),1262 },1263 expectedErr: nil,1264 },1265 {1266 name: "OP_DATA_51 long",1267 pop: &parsedOpcode{1268 opcode: &opcodeArray[OP_DATA_51],1269 data: make([]byte, 52),1270 },1271 expectedErr: scriptError(ErrInternal, ""),1272 },1273 {1274 name: "OP_DATA_52 short",1275 pop: &parsedOpcode{1276 opcode: &opcodeArray[OP_DATA_52],1277 data: make([]byte, 51),1278 },1279 expectedErr: scriptError(ErrInternal, ""),1280 },1281 {1282 name: "OP_DATA_52",1283 pop: &parsedOpcode{1284 opcode: &opcodeArray[OP_DATA_52],1285 data: make([]byte, 52),1286 },1287 expectedErr: nil,1288 },1289 {1290 name: "OP_DATA_52 long",1291 pop: &parsedOpcode{1292 opcode: &opcodeArray[OP_DATA_52],1293 data: make([]byte, 53),1294 },1295 expectedErr: scriptError(ErrInternal, ""),1296 },1297 {1298 name: "OP_DATA_53 short",1299 pop: &parsedOpcode{1300 opcode: &opcodeArray[OP_DATA_53],1301 data: make([]byte, 52),1302 },1303 expectedErr: scriptError(ErrInternal, ""),1304 },1305 {1306 name: "OP_DATA_53",1307 pop: &parsedOpcode{1308 opcode: &opcodeArray[OP_DATA_53],1309 data: make([]byte, 53),1310 },1311 expectedErr: nil,1312 },1313 {1314 name: "OP_DATA_53 long",1315 pop: &parsedOpcode{1316 opcode: &opcodeArray[OP_DATA_53],1317 data: make([]byte, 54),1318 },1319 expectedErr: scriptError(ErrInternal, ""),1320 },1321 {1322 name: "OP_DATA_54 short",1323 pop: &parsedOpcode{1324 opcode: &opcodeArray[OP_DATA_54],1325 data: make([]byte, 53),1326 },1327 expectedErr: scriptError(ErrInternal, ""),1328 },1329 {1330 name: "OP_DATA_54",1331 pop: &parsedOpcode{1332 opcode: &opcodeArray[OP_DATA_54],1333 data: make([]byte, 54),1334 },1335 expectedErr: nil,1336 },1337 {1338 name: "OP_DATA_54 long",1339 pop: &parsedOpcode{1340 opcode: &opcodeArray[OP_DATA_54],1341 data: make([]byte, 55),1342 },1343 expectedErr: scriptError(ErrInternal, ""),1344 },1345 {1346 name: "OP_DATA_55 short",1347 pop: &parsedOpcode{1348 opcode: &opcodeArray[OP_DATA_55],1349 data: make([]byte, 54),1350 },1351 expectedErr: scriptError(ErrInternal, ""),1352 },1353 {1354 name: "OP_DATA_55",1355 pop: &parsedOpcode{1356 opcode: &opcodeArray[OP_DATA_55],1357 data: make([]byte, 55),1358 },1359 expectedErr: nil,1360 },1361 {1362 name: "OP_DATA_55 long",1363 pop: &parsedOpcode{1364 opcode: &opcodeArray[OP_DATA_55],1365 data: make([]byte, 56),1366 },1367 expectedErr: scriptError(ErrInternal, ""),1368 },1369 {1370 name: "OP_DATA_56 short",1371 pop: &parsedOpcode{1372 opcode: &opcodeArray[OP_DATA_56],1373 data: make([]byte, 55),1374 },1375 expectedErr: scriptError(ErrInternal, ""),1376 },1377 {1378 name: "OP_DATA_56",1379 pop: &parsedOpcode{1380 opcode: &opcodeArray[OP_DATA_56],1381 data: make([]byte, 56),1382 },1383 expectedErr: nil,1384 },1385 {1386 name: "OP_DATA_56 long",1387 pop: &parsedOpcode{1388 opcode: &opcodeArray[OP_DATA_56],1389 data: make([]byte, 57),1390 },1391 expectedErr: scriptError(ErrInternal, ""),1392 },1393 {1394 name: "OP_DATA_57 short",1395 pop: &parsedOpcode{1396 opcode: &opcodeArray[OP_DATA_57],1397 data: make([]byte, 56),1398 },1399 expectedErr: scriptError(ErrInternal, ""),1400 },1401 {1402 name: "OP_DATA_57",1403 pop: &parsedOpcode{1404 opcode: &opcodeArray[OP_DATA_57],1405 data: make([]byte, 57),1406 },1407 expectedErr: nil,1408 },1409 {1410 name: "OP_DATA_57 long",1411 pop: &parsedOpcode{1412 opcode: &opcodeArray[OP_DATA_57],1413 data: make([]byte, 58),1414 },1415 expectedErr: scriptError(ErrInternal, ""),1416 },1417 {1418 name: "OP_DATA_58 short",1419 pop: &parsedOpcode{1420 opcode: &opcodeArray[OP_DATA_58],1421 data: make([]byte, 57),1422 },1423 expectedErr: scriptError(ErrInternal, ""),1424 },1425 {1426 name: "OP_DATA_58",1427 pop: &parsedOpcode{1428 opcode: &opcodeArray[OP_DATA_58],1429 data: make([]byte, 58),1430 },1431 expectedErr: nil,1432 },1433 {1434 name: "OP_DATA_58 long",1435 pop: &parsedOpcode{1436 opcode: &opcodeArray[OP_DATA_58],1437 data: make([]byte, 59),1438 },1439 expectedErr: scriptError(ErrInternal, ""),1440 },1441 {1442 name: "OP_DATA_59 short",1443 pop: &parsedOpcode{1444 opcode: &opcodeArray[OP_DATA_59],1445 data: make([]byte, 58),1446 },1447 expectedErr: scriptError(ErrInternal, ""),1448 },1449 {1450 name: "OP_DATA_59",1451 pop: &parsedOpcode{1452 opcode: &opcodeArray[OP_DATA_59],1453 data: make([]byte, 59),1454 },1455 expectedErr: nil,1456 },1457 {1458 name: "OP_DATA_59 long",1459 pop: &parsedOpcode{1460 opcode: &opcodeArray[OP_DATA_59],1461 data: make([]byte, 60),1462 },1463 expectedErr: scriptError(ErrInternal, ""),1464 },1465 {1466 name: "OP_DATA_60 short",1467 pop: &parsedOpcode{1468 opcode: &opcodeArray[OP_DATA_60],1469 data: make([]byte, 59),1470 },1471 expectedErr: scriptError(ErrInternal, ""),1472 },1473 {1474 name: "OP_DATA_60",1475 pop: &parsedOpcode{1476 opcode: &opcodeArray[OP_DATA_60],1477 data: make([]byte, 60),1478 },1479 expectedErr: nil,1480 },1481 {1482 name: "OP_DATA_60 long",1483 pop: &parsedOpcode{1484 opcode: &opcodeArray[OP_DATA_60],1485 data: make([]byte, 61),1486 },1487 expectedErr: scriptError(ErrInternal, ""),1488 },1489 {1490 name: "OP_DATA_61 short",1491 pop: &parsedOpcode{1492 opcode: &opcodeArray[OP_DATA_61],1493 data: make([]byte, 60),1494 },1495 expectedErr: scriptError(ErrInternal, ""),1496 },1497 {1498 name: "OP_DATA_61",1499 pop: &parsedOpcode{1500 opcode: &opcodeArray[OP_DATA_61],1501 data: make([]byte, 61),1502 },1503 expectedErr: nil,1504 },1505 {1506 name: "OP_DATA_61 long",1507 pop: &parsedOpcode{1508 opcode: &opcodeArray[OP_DATA_61],1509 data: make([]byte, 62),1510 },1511 expectedErr: scriptError(ErrInternal, ""),1512 },1513 {1514 name: "OP_DATA_62 short",1515 pop: &parsedOpcode{1516 opcode: &opcodeArray[OP_DATA_62],1517 data: make([]byte, 61),1518 },1519 expectedErr: scriptError(ErrInternal, ""),1520 },1521 {1522 name: "OP_DATA_62",1523 pop: &parsedOpcode{1524 opcode: &opcodeArray[OP_DATA_62],1525 data: make([]byte, 62),1526 },1527 expectedErr: nil,1528 },1529 {1530 name: "OP_DATA_62 long",1531 pop: &parsedOpcode{1532 opcode: &opcodeArray[OP_DATA_62],1533 data: make([]byte, 63),1534 },1535 expectedErr: scriptError(ErrInternal, ""),1536 },1537 {1538 name: "OP_DATA_63 short",1539 pop: &parsedOpcode{1540 opcode: &opcodeArray[OP_DATA_63],1541 data: make([]byte, 62),1542 },1543 expectedErr: scriptError(ErrInternal, ""),1544 },1545 {1546 name: "OP_DATA_63",1547 pop: &parsedOpcode{1548 opcode: &opcodeArray[OP_DATA_63],1549 data: make([]byte, 63),1550 },1551 expectedErr: nil,1552 },1553 {1554 name: "OP_DATA_63 long",1555 pop: &parsedOpcode{1556 opcode: &opcodeArray[OP_DATA_63],1557 data: make([]byte, 64),1558 },1559 expectedErr: scriptError(ErrInternal, ""),1560 },1561 {1562 name: "OP_DATA_64 short",1563 pop: &parsedOpcode{1564 opcode: &opcodeArray[OP_DATA_64],1565 data: make([]byte, 63),1566 },1567 expectedErr: scriptError(ErrInternal, ""),1568 },1569 {1570 name: "OP_DATA_64",1571 pop: &parsedOpcode{1572 opcode: &opcodeArray[OP_DATA_64],1573 data: make([]byte, 64),1574 },1575 expectedErr: nil,1576 },1577 {1578 name: "OP_DATA_64 long",1579 pop: &parsedOpcode{1580 opcode: &opcodeArray[OP_DATA_64],1581 data: make([]byte, 65),1582 },1583 expectedErr: scriptError(ErrInternal, ""),1584 },1585 {1586 name: "OP_DATA_65 short",1587 pop: &parsedOpcode{1588 opcode: &opcodeArray[OP_DATA_65],1589 data: make([]byte, 64),1590 },1591 expectedErr: scriptError(ErrInternal, ""),1592 },1593 {1594 name: "OP_DATA_65",1595 pop: &parsedOpcode{1596 opcode: &opcodeArray[OP_DATA_65],1597 data: make([]byte, 65),1598 },1599 expectedErr: nil,1600 },1601 {1602 name: "OP_DATA_65 long",1603 pop: &parsedOpcode{1604 opcode: &opcodeArray[OP_DATA_65],1605 data: make([]byte, 66),1606 },1607 expectedErr: scriptError(ErrInternal, ""),1608 },1609 {1610 name: "OP_DATA_66 short",1611 pop: &parsedOpcode{1612 opcode: &opcodeArray[OP_DATA_66],1613 data: make([]byte, 65),1614 },1615 expectedErr: scriptError(ErrInternal, ""),1616 },1617 {1618 name: "OP_DATA_66",1619 pop: &parsedOpcode{1620 opcode: &opcodeArray[OP_DATA_66],1621 data: make([]byte, 66),1622 },1623 expectedErr: nil,1624 },1625 {1626 name: "OP_DATA_66 long",1627 pop: &parsedOpcode{1628 opcode: &opcodeArray[OP_DATA_66],1629 data: make([]byte, 67),1630 },1631 expectedErr: scriptError(ErrInternal, ""),1632 },1633 {1634 name: "OP_DATA_67 short",1635 pop: &parsedOpcode{1636 opcode: &opcodeArray[OP_DATA_67],1637 data: make([]byte, 66),1638 },1639 expectedErr: scriptError(ErrInternal, ""),1640 },1641 {1642 name: "OP_DATA_67",1643 pop: &parsedOpcode{1644 opcode: &opcodeArray[OP_DATA_67],1645 data: make([]byte, 67),1646 },1647 expectedErr: nil,1648 },1649 {1650 name: "OP_DATA_67 long",1651 pop: &parsedOpcode{1652 opcode: &opcodeArray[OP_DATA_67],1653 data: make([]byte, 68),1654 },1655 expectedErr: scriptError(ErrInternal, ""),1656 },1657 {1658 name: "OP_DATA_68 short",1659 pop: &parsedOpcode{1660 opcode: &opcodeArray[OP_DATA_68],1661 data: make([]byte, 67),1662 },1663 expectedErr: scriptError(ErrInternal, ""),1664 },1665 {1666 name: "OP_DATA_68",1667 pop: &parsedOpcode{1668 opcode: &opcodeArray[OP_DATA_68],1669 data: make([]byte, 68),1670 },1671 expectedErr: nil,1672 },1673 {1674 name: "OP_DATA_68 long",1675 pop: &parsedOpcode{1676 opcode: &opcodeArray[OP_DATA_68],1677 data: make([]byte, 69),1678 },1679 expectedErr: scriptError(ErrInternal, ""),1680 },1681 {1682 name: "OP_DATA_69 short",1683 pop: &parsedOpcode{1684 opcode: &opcodeArray[OP_DATA_69],1685 data: make([]byte, 68),1686 },1687 expectedErr: scriptError(ErrInternal, ""),1688 },1689 {1690 name: "OP_DATA_69",1691 pop: &parsedOpcode{1692 opcode: &opcodeArray[OP_DATA_69],1693 data: make([]byte, 69),1694 },1695 expectedErr: nil,1696 },1697 {1698 name: "OP_DATA_69 long",1699 pop: &parsedOpcode{1700 opcode: &opcodeArray[OP_DATA_69],1701 data: make([]byte, 70),1702 },1703 expectedErr: scriptError(ErrInternal, ""),1704 },1705 {1706 name: "OP_DATA_70 short",1707 pop: &parsedOpcode{1708 opcode: &opcodeArray[OP_DATA_70],1709 data: make([]byte, 69),1710 },1711 expectedErr: scriptError(ErrInternal, ""),1712 },1713 {1714 name: "OP_DATA_70",1715 pop: &parsedOpcode{1716 opcode: &opcodeArray[OP_DATA_70],1717 data: make([]byte, 70),1718 },1719 expectedErr: nil,1720 },1721 {1722 name: "OP_DATA_70 long",1723 pop: &parsedOpcode{1724 opcode: &opcodeArray[OP_DATA_70],1725 data: make([]byte, 71),1726 },1727 expectedErr: scriptError(ErrInternal, ""),1728 },1729 {1730 name: "OP_DATA_71 short",1731 pop: &parsedOpcode{1732 opcode: &opcodeArray[OP_DATA_71],1733 data: make([]byte, 70),1734 },1735 expectedErr: scriptError(ErrInternal, ""),1736 },1737 {1738 name: "OP_DATA_71",1739 pop: &parsedOpcode{1740 opcode: &opcodeArray[OP_DATA_71],1741 data: make([]byte, 71),1742 },1743 expectedErr: nil,1744 },1745 {1746 name: "OP_DATA_71 long",1747 pop: &parsedOpcode{1748 opcode: &opcodeArray[OP_DATA_71],1749 data: make([]byte, 72),1750 },1751 expectedErr: scriptError(ErrInternal, ""),1752 },1753 {1754 name: "OP_DATA_72 short",1755 pop: &parsedOpcode{1756 opcode: &opcodeArray[OP_DATA_72],1757 data: make([]byte, 71),1758 },1759 expectedErr: scriptError(ErrInternal, ""),1760 },1761 {1762 name: "OP_DATA_72",1763 pop: &parsedOpcode{1764 opcode: &opcodeArray[OP_DATA_72],1765 data: make([]byte, 72),1766 },1767 expectedErr: nil,1768 },1769 {1770 name: "OP_DATA_72 long",1771 pop: &parsedOpcode{1772 opcode: &opcodeArray[OP_DATA_72],1773 data: make([]byte, 73),1774 },1775 expectedErr: scriptError(ErrInternal, ""),1776 },1777 {1778 name: "OP_DATA_73 short",1779 pop: &parsedOpcode{1780 opcode: &opcodeArray[OP_DATA_73],1781 data: make([]byte, 72),1782 },1783 expectedErr: scriptError(ErrInternal, ""),1784 },1785 {1786 name: "OP_DATA_73",1787 pop: &parsedOpcode{1788 opcode: &opcodeArray[OP_DATA_73],1789 data: make([]byte, 73),1790 },1791 expectedErr: nil,1792 },1793 {1794 name: "OP_DATA_73 long",1795 pop: &parsedOpcode{1796 opcode: &opcodeArray[OP_DATA_73],1797 data: make([]byte, 74),1798 },1799 expectedErr: scriptError(ErrInternal, ""),1800 },1801 {1802 name: "OP_DATA_74 short",1803 pop: &parsedOpcode{1804 opcode: &opcodeArray[OP_DATA_74],1805 data: make([]byte, 73),1806 },1807 expectedErr: scriptError(ErrInternal, ""),1808 },1809 {1810 name: "OP_DATA_74",1811 pop: &parsedOpcode{1812 opcode: &opcodeArray[OP_DATA_74],1813 data: make([]byte, 74),1814 },1815 expectedErr: nil,1816 },1817 {1818 name: "OP_DATA_74 long",1819 pop: &parsedOpcode{1820 opcode: &opcodeArray[OP_DATA_74],1821 data: make([]byte, 75),1822 },1823 expectedErr: scriptError(ErrInternal, ""),1824 },1825 {1826 name: "OP_DATA_75 short",1827 pop: &parsedOpcode{1828 opcode: &opcodeArray[OP_DATA_75],1829 data: make([]byte, 74),1830 },1831 expectedErr: scriptError(ErrInternal, ""),1832 },1833 {1834 name: "OP_DATA_75",1835 pop: &parsedOpcode{1836 opcode: &opcodeArray[OP_DATA_75],1837 data: make([]byte, 75),1838 },1839 expectedErr: nil,1840 },1841 {1842 name: "OP_DATA_75 long",1843 pop: &parsedOpcode{1844 opcode: &opcodeArray[OP_DATA_75],1845 data: make([]byte, 76),1846 },1847 expectedErr: scriptError(ErrInternal, ""),1848 },1849 {1850 name: "OP_PUSHDATA1",1851 pop: &parsedOpcode{1852 opcode: &opcodeArray[OP_PUSHDATA1],1853 data: []byte{0, 1, 2, 3, 4},1854 },1855 expectedErr: nil,1856 },1857 {1858 name: "OP_PUSHDATA2",1859 pop: &parsedOpcode{1860 opcode: &opcodeArray[OP_PUSHDATA2],1861 data: []byte{0, 1, 2, 3, 4},1862 },1863 expectedErr: nil,1864 },1865 {1866 name: "OP_PUSHDATA4",1867 pop: &parsedOpcode{1868 opcode: &opcodeArray[OP_PUSHDATA1],1869 data: []byte{0, 1, 2, 3, 4},1870 },1871 expectedErr: nil,1872 },1873 {1874 name: "OP_1NEGATE",1875 pop: &parsedOpcode{1876 opcode: &opcodeArray[OP_1NEGATE],1877 data: nil,1878 },1879 expectedErr: nil,1880 },1881 {1882 name: "OP_1NEGATE long",1883 pop: &parsedOpcode{1884 opcode: &opcodeArray[OP_1NEGATE],1885 data: make([]byte, 1),1886 },1887 expectedErr: scriptError(ErrInternal, ""),1888 },1889 {1890 name: "OP_RESERVED",1891 pop: &parsedOpcode{1892 opcode: &opcodeArray[OP_RESERVED],1893 data: nil,1894 },1895 expectedErr: nil,1896 },1897 {1898 name: "OP_RESERVED long",1899 pop: &parsedOpcode{1900 opcode: &opcodeArray[OP_RESERVED],1901 data: make([]byte, 1),1902 },1903 expectedErr: scriptError(ErrInternal, ""),1904 },1905 {1906 name: "OP_TRUE",1907 pop: &parsedOpcode{1908 opcode: &opcodeArray[OP_TRUE],1909 data: nil,1910 },1911 expectedErr: nil,1912 },1913 {1914 name: "OP_TRUE long",1915 pop: &parsedOpcode{1916 opcode: &opcodeArray[OP_TRUE],1917 data: make([]byte, 1),1918 },1919 expectedErr: scriptError(ErrInternal, ""),1920 },1921 {1922 name: "OP_2",1923 pop: &parsedOpcode{1924 opcode: &opcodeArray[OP_2],1925 data: nil,1926 },1927 expectedErr: nil,1928 },1929 {1930 name: "OP_2 long",1931 pop: &parsedOpcode{1932 opcode: &opcodeArray[OP_2],1933 data: make([]byte, 1),1934 },1935 expectedErr: scriptError(ErrInternal, ""),1936 },1937 {1938 name: "OP_2",1939 pop: &parsedOpcode{1940 opcode: &opcodeArray[OP_2],1941 data: nil,1942 },1943 expectedErr: nil,1944 },1945 {1946 name: "OP_2 long",1947 pop: &parsedOpcode{1948 opcode: &opcodeArray[OP_2],1949 data: make([]byte, 1),1950 },1951 expectedErr: scriptError(ErrInternal, ""),1952 },1953 {1954 name: "OP_3",1955 pop: &parsedOpcode{1956 opcode: &opcodeArray[OP_3],1957 data: nil,1958 },1959 expectedErr: nil,1960 },1961 {1962 name: "OP_3 long",1963 pop: &parsedOpcode{1964 opcode: &opcodeArray[OP_3],1965 data: make([]byte, 1),1966 },1967 expectedErr: scriptError(ErrInternal, ""),1968 },1969 {1970 name: "OP_4",1971 pop: &parsedOpcode{1972 opcode: &opcodeArray[OP_4],1973 data: nil,1974 },1975 expectedErr: nil,1976 },1977 {1978 name: "OP_4 long",1979 pop: &parsedOpcode{1980 opcode: &opcodeArray[OP_4],1981 data: make([]byte, 1),1982 },1983 expectedErr: scriptError(ErrInternal, ""),1984 },1985 {1986 name: "OP_5",1987 pop: &parsedOpcode{1988 opcode: &opcodeArray[OP_5],1989 data: nil,1990 },1991 expectedErr: nil,1992 },1993 {1994 name: "OP_5 long",1995 pop: &parsedOpcode{1996 opcode: &opcodeArray[OP_5],1997 data: make([]byte, 1),1998 },1999 expectedErr: scriptError(ErrInternal, ""),2000 },2001 {2002 name: "OP_6",2003 pop: &parsedOpcode{2004 opcode: &opcodeArray[OP_6],2005 data: nil,2006 },2007 expectedErr: nil,2008 },2009 {2010 name: "OP_6 long",2011 pop: &parsedOpcode{2012 opcode: &opcodeArray[OP_6],2013 data: make([]byte, 1),2014 },2015 expectedErr: scriptError(ErrInternal, ""),2016 },2017 {2018 name: "OP_7",2019 pop: &parsedOpcode{2020 opcode: &opcodeArray[OP_7],2021 data: nil,2022 },2023 expectedErr: nil,2024 },2025 {2026 name: "OP_7 long",2027 pop: &parsedOpcode{2028 opcode: &opcodeArray[OP_7],2029 data: make([]byte, 1),2030 },2031 expectedErr: scriptError(ErrInternal, ""),2032 },2033 {2034 name: "OP_8",2035 pop: &parsedOpcode{2036 opcode: &opcodeArray[OP_8],2037 data: nil,2038 },2039 expectedErr: nil,2040 },2041 {2042 name: "OP_8 long",2043 pop: &parsedOpcode{2044 opcode: &opcodeArray[OP_8],2045 data: make([]byte, 1),2046 },2047 expectedErr: scriptError(ErrInternal, ""),2048 },2049 {2050 name: "OP_9",2051 pop: &parsedOpcode{2052 opcode: &opcodeArray[OP_9],2053 data: nil,2054 },2055 expectedErr: nil,2056 },2057 {2058 name: "OP_9 long",2059 pop: &parsedOpcode{2060 opcode: &opcodeArray[OP_9],2061 data: make([]byte, 1),2062 },2063 expectedErr: scriptError(ErrInternal, ""),2064 },2065 {2066 name: "OP_10",2067 pop: &parsedOpcode{2068 opcode: &opcodeArray[OP_10],2069 data: nil,2070 },2071 expectedErr: nil,2072 },2073 {2074 name: "OP_10 long",2075 pop: &parsedOpcode{2076 opcode: &opcodeArray[OP_10],2077 data: make([]byte, 1),2078 },2079 expectedErr: scriptError(ErrInternal, ""),2080 },2081 {2082 name: "OP_11",2083 pop: &parsedOpcode{2084 opcode: &opcodeArray[OP_11],2085 data: nil,2086 },2087 expectedErr: nil,2088 },2089 {2090 name: "OP_11 long",2091 pop: &parsedOpcode{2092 opcode: &opcodeArray[OP_11],2093 data: make([]byte, 1),2094 },2095 expectedErr: scriptError(ErrInternal, ""),2096 },2097 {2098 name: "OP_12",2099 pop: &parsedOpcode{2100 opcode: &opcodeArray[OP_12],2101 data: nil,2102 },2103 expectedErr: nil,2104 },2105 {2106 name: "OP_12 long",2107 pop: &parsedOpcode{2108 opcode: &opcodeArray[OP_12],2109 data: make([]byte, 1),2110 },2111 expectedErr: scriptError(ErrInternal, ""),2112 },2113 {2114 name: "OP_13",2115 pop: &parsedOpcode{2116 opcode: &opcodeArray[OP_13],2117 data: nil,2118 },2119 expectedErr: nil,2120 },2121 {2122 name: "OP_13 long",2123 pop: &parsedOpcode{2124 opcode: &opcodeArray[OP_13],2125 data: make([]byte, 1),2126 },2127 expectedErr: scriptError(ErrInternal, ""),2128 },2129 {2130 name: "OP_14",2131 pop: &parsedOpcode{2132 opcode: &opcodeArray[OP_14],2133 data: nil,2134 },2135 expectedErr: nil,2136 },2137 {2138 name: "OP_14 long",2139 pop: &parsedOpcode{2140 opcode: &opcodeArray[OP_14],2141 data: make([]byte, 1),2142 },2143 expectedErr: scriptError(ErrInternal, ""),2144 },2145 {2146 name: "OP_15",2147 pop: &parsedOpcode{2148 opcode: &opcodeArray[OP_15],2149 data: nil,2150 },2151 expectedErr: nil,2152 },2153 {2154 name: "OP_15 long",2155 pop: &parsedOpcode{2156 opcode: &opcodeArray[OP_15],2157 data: make([]byte, 1),2158 },2159 expectedErr: scriptError(ErrInternal, ""),2160 },2161 {2162 name: "OP_16",2163 pop: &parsedOpcode{2164 opcode: &opcodeArray[OP_16],2165 data: nil,2166 },2167 expectedErr: nil,2168 },2169 {2170 name: "OP_16 long",2171 pop: &parsedOpcode{2172 opcode: &opcodeArray[OP_16],2173 data: make([]byte, 1),2174 },2175 expectedErr: scriptError(ErrInternal, ""),2176 },2177 {2178 name: "OP_NOP",2179 pop: &parsedOpcode{2180 opcode: &opcodeArray[OP_NOP],2181 data: nil,2182 },2183 expectedErr: nil,2184 },2185 {2186 name: "OP_NOP long",2187 pop: &parsedOpcode{2188 opcode: &opcodeArray[OP_NOP],2189 data: make([]byte, 1),2190 },2191 expectedErr: scriptError(ErrInternal, ""),2192 },2193 {2194 name: "OP_VER",2195 pop: &parsedOpcode{2196 opcode: &opcodeArray[OP_VER],2197 data: nil,2198 },2199 expectedErr: nil,2200 },2201 {2202 name: "OP_VER long",2203 pop: &parsedOpcode{2204 opcode: &opcodeArray[OP_VER],2205 data: make([]byte, 1),2206 },2207 expectedErr: scriptError(ErrInternal, ""),2208 },2209 {2210 name: "OP_IF",2211 pop: &parsedOpcode{2212 opcode: &opcodeArray[OP_IF],2213 data: nil,2214 },2215 expectedErr: nil,2216 },2217 {2218 name: "OP_IF long",2219 pop: &parsedOpcode{2220 opcode: &opcodeArray[OP_IF],2221 data: make([]byte, 1),2222 },2223 expectedErr: scriptError(ErrInternal, ""),2224 },2225 {2226 name: "OP_NOTIF",2227 pop: &parsedOpcode{2228 opcode: &opcodeArray[OP_NOTIF],2229 data: nil,2230 },2231 expectedErr: nil,2232 },2233 {2234 name: "OP_NOTIF long",2235 pop: &parsedOpcode{2236 opcode: &opcodeArray[OP_NOTIF],2237 data: make([]byte, 1),2238 },2239 expectedErr: scriptError(ErrInternal, ""),2240 },2241 {2242 name: "OP_VERIF",2243 pop: &parsedOpcode{2244 opcode: &opcodeArray[OP_VERIF],2245 data: nil,2246 },2247 expectedErr: nil,2248 },2249 {2250 name: "OP_VERIF long",2251 pop: &parsedOpcode{2252 opcode: &opcodeArray[OP_VERIF],2253 data: make([]byte, 1),2254 },2255 expectedErr: scriptError(ErrInternal, ""),2256 },2257 {2258 name: "OP_VERNOTIF",2259 pop: &parsedOpcode{2260 opcode: &opcodeArray[OP_VERNOTIF],2261 data: nil,2262 },2263 expectedErr: nil,2264 },2265 {2266 name: "OP_VERNOTIF long",2267 pop: &parsedOpcode{2268 opcode: &opcodeArray[OP_VERNOTIF],2269 data: make([]byte, 1),2270 },2271 expectedErr: scriptError(ErrInternal, ""),2272 },2273 {2274 name: "OP_ELSE",2275 pop: &parsedOpcode{2276 opcode: &opcodeArray[OP_ELSE],2277 data: nil,2278 },2279 expectedErr: nil,2280 },2281 {2282 name: "OP_ELSE long",2283 pop: &parsedOpcode{2284 opcode: &opcodeArray[OP_ELSE],2285 data: make([]byte, 1),2286 },2287 expectedErr: scriptError(ErrInternal, ""),2288 },2289 {2290 name: "OP_ENDIF",2291 pop: &parsedOpcode{2292 opcode: &opcodeArray[OP_ENDIF],2293 data: nil,2294 },2295 expectedErr: nil,2296 },2297 {2298 name: "OP_ENDIF long",2299 pop: &parsedOpcode{2300 opcode: &opcodeArray[OP_ENDIF],2301 data: make([]byte, 1),2302 },2303 expectedErr: scriptError(ErrInternal, ""),2304 },2305 {2306 name: "OP_VERIFY",2307 pop: &parsedOpcode{2308 opcode: &opcodeArray[OP_VERIFY],2309 data: nil,2310 },2311 expectedErr: nil,2312 },2313 {2314 name: "OP_VERIFY long",2315 pop: &parsedOpcode{2316 opcode: &opcodeArray[OP_VERIFY],2317 data: make([]byte, 1),2318 },2319 expectedErr: scriptError(ErrInternal, ""),2320 },2321 {2322 name: "OP_RETURN",2323 pop: &parsedOpcode{2324 opcode: &opcodeArray[OP_RETURN],2325 data: nil,2326 },2327 expectedErr: nil,2328 },2329 {2330 name: "OP_RETURN long",2331 pop: &parsedOpcode{2332 opcode: &opcodeArray[OP_RETURN],2333 data: make([]byte, 1),2334 },2335 expectedErr: scriptError(ErrInternal, ""),2336 },2337 {2338 name: "OP_TOALTSTACK",2339 pop: &parsedOpcode{2340 opcode: &opcodeArray[OP_TOALTSTACK],2341 data: nil,2342 },2343 expectedErr: nil,2344 },2345 {2346 name: "OP_TOALTSTACK long",2347 pop: &parsedOpcode{2348 opcode: &opcodeArray[OP_TOALTSTACK],2349 data: make([]byte, 1),2350 },2351 expectedErr: scriptError(ErrInternal, ""),2352 },2353 {2354 name: "OP_FROMALTSTACK",2355 pop: &parsedOpcode{2356 opcode: &opcodeArray[OP_FROMALTSTACK],2357 data: nil,2358 },2359 expectedErr: nil,2360 },2361 {2362 name: "OP_FROMALTSTACK long",2363 pop: &parsedOpcode{2364 opcode: &opcodeArray[OP_FROMALTSTACK],2365 data: make([]byte, 1),2366 },2367 expectedErr: scriptError(ErrInternal, ""),2368 },2369 {2370 name: "OP_2DROP",2371 pop: &parsedOpcode{2372 opcode: &opcodeArray[OP_2DROP],2373 data: nil,2374 },2375 expectedErr: nil,2376 },2377 {2378 name: "OP_2DROP long",2379 pop: &parsedOpcode{2380 opcode: &opcodeArray[OP_2DROP],2381 data: make([]byte, 1),2382 },2383 expectedErr: scriptError(ErrInternal, ""),2384 },2385 {2386 name: "OP_2DUP",2387 pop: &parsedOpcode{2388 opcode: &opcodeArray[OP_2DUP],2389 data: nil,2390 },2391 expectedErr: nil,2392 },2393 {2394 name: "OP_2DUP long",2395 pop: &parsedOpcode{2396 opcode: &opcodeArray[OP_2DUP],2397 data: make([]byte, 1),2398 },2399 expectedErr: scriptError(ErrInternal, ""),2400 },2401 {2402 name: "OP_3DUP",2403 pop: &parsedOpcode{2404 opcode: &opcodeArray[OP_3DUP],2405 data: nil,2406 },2407 expectedErr: nil,2408 },2409 {2410 name: "OP_3DUP long",2411 pop: &parsedOpcode{2412 opcode: &opcodeArray[OP_3DUP],2413 data: make([]byte, 1),2414 },2415 expectedErr: scriptError(ErrInternal, ""),2416 },2417 {2418 name: "OP_2OVER",2419 pop: &parsedOpcode{2420 opcode: &opcodeArray[OP_2OVER],2421 data: nil,2422 },2423 expectedErr: nil,2424 },2425 {2426 name: "OP_2OVER long",2427 pop: &parsedOpcode{2428 opcode: &opcodeArray[OP_2OVER],2429 data: make([]byte, 1),2430 },2431 expectedErr: scriptError(ErrInternal, ""),2432 },2433 {2434 name: "OP_2ROT",2435 pop: &parsedOpcode{2436 opcode: &opcodeArray[OP_2ROT],2437 data: nil,2438 },2439 expectedErr: nil,2440 },2441 {2442 name: "OP_2ROT long",2443 pop: &parsedOpcode{2444 opcode: &opcodeArray[OP_2ROT],2445 data: make([]byte, 1),2446 },2447 expectedErr: scriptError(ErrInternal, ""),2448 },2449 {2450 name: "OP_2SWAP",2451 pop: &parsedOpcode{2452 opcode: &opcodeArray[OP_2SWAP],2453 data: nil,2454 },2455 expectedErr: nil,2456 },2457 {2458 name: "OP_2SWAP long",2459 pop: &parsedOpcode{2460 opcode: &opcodeArray[OP_2SWAP],2461 data: make([]byte, 1),2462 },2463 expectedErr: scriptError(ErrInternal, ""),2464 },2465 {2466 name: "OP_IFDUP",2467 pop: &parsedOpcode{2468 opcode: &opcodeArray[OP_IFDUP],2469 data: nil,2470 },2471 expectedErr: nil,2472 },2473 {2474 name: "OP_IFDUP long",2475 pop: &parsedOpcode{2476 opcode: &opcodeArray[OP_IFDUP],2477 data: make([]byte, 1),2478 },2479 expectedErr: scriptError(ErrInternal, ""),2480 },2481 {2482 name: "OP_DEPTH",2483 pop: &parsedOpcode{2484 opcode: &opcodeArray[OP_DEPTH],2485 data: nil,2486 },2487 expectedErr: nil,2488 },2489 {2490 name: "OP_DEPTH long",2491 pop: &parsedOpcode{2492 opcode: &opcodeArray[OP_DEPTH],2493 data: make([]byte, 1),2494 },2495 expectedErr: scriptError(ErrInternal, ""),2496 },2497 {2498 name: "OP_DROP",2499 pop: &parsedOpcode{2500 opcode: &opcodeArray[OP_DROP],2501 data: nil,2502 },2503 expectedErr: nil,2504 },2505 {2506 name: "OP_DROP long",2507 pop: &parsedOpcode{2508 opcode: &opcodeArray[OP_DROP],2509 data: make([]byte, 1),2510 },2511 expectedErr: scriptError(ErrInternal, ""),2512 },2513 {2514 name: "OP_DUP",2515 pop: &parsedOpcode{2516 opcode: &opcodeArray[OP_DUP],2517 data: nil,2518 },2519 expectedErr: nil,2520 },2521 {2522 name: "OP_DUP long",2523 pop: &parsedOpcode{2524 opcode: &opcodeArray[OP_DUP],2525 data: make([]byte, 1),2526 },2527 expectedErr: scriptError(ErrInternal, ""),2528 },2529 {2530 name: "OP_NIP",2531 pop: &parsedOpcode{2532 opcode: &opcodeArray[OP_NIP],2533 data: nil,2534 },2535 expectedErr: nil,2536 },2537 {2538 name: "OP_NIP long",2539 pop: &parsedOpcode{2540 opcode: &opcodeArray[OP_NIP],2541 data: make([]byte, 1),2542 },2543 expectedErr: scriptError(ErrInternal, ""),2544 },2545 {2546 name: "OP_OVER",2547 pop: &parsedOpcode{2548 opcode: &opcodeArray[OP_OVER],2549 data: nil,2550 },2551 expectedErr: nil,2552 },2553 {2554 name: "OP_OVER long",2555 pop: &parsedOpcode{2556 opcode: &opcodeArray[OP_OVER],2557 data: make([]byte, 1),2558 },2559 expectedErr: scriptError(ErrInternal, ""),2560 },2561 {2562 name: "OP_PICK",2563 pop: &parsedOpcode{2564 opcode: &opcodeArray[OP_PICK],2565 data: nil,2566 },2567 expectedErr: nil,2568 },2569 {2570 name: "OP_PICK long",2571 pop: &parsedOpcode{2572 opcode: &opcodeArray[OP_PICK],2573 data: make([]byte, 1),2574 },2575 expectedErr: scriptError(ErrInternal, ""),2576 },2577 {2578 name: "OP_ROLL",2579 pop: &parsedOpcode{2580 opcode: &opcodeArray[OP_ROLL],2581 data: nil,2582 },2583 expectedErr: nil,2584 },2585 {2586 name: "OP_ROLL long",2587 pop: &parsedOpcode{2588 opcode: &opcodeArray[OP_ROLL],2589 data: make([]byte, 1),2590 },2591 expectedErr: scriptError(ErrInternal, ""),2592 },2593 {2594 name: "OP_ROT",2595 pop: &parsedOpcode{2596 opcode: &opcodeArray[OP_ROT],2597 data: nil,2598 },2599 expectedErr: nil,2600 },2601 {2602 name: "OP_ROT long",2603 pop: &parsedOpcode{2604 opcode: &opcodeArray[OP_ROT],2605 data: make([]byte, 1),2606 },2607 expectedErr: scriptError(ErrInternal, ""),2608 },2609 {2610 name: "OP_SWAP",2611 pop: &parsedOpcode{2612 opcode: &opcodeArray[OP_SWAP],2613 data: nil,2614 },2615 expectedErr: nil,2616 },2617 {2618 name: "OP_SWAP long",2619 pop: &parsedOpcode{2620 opcode: &opcodeArray[OP_SWAP],2621 data: make([]byte, 1),2622 },2623 expectedErr: scriptError(ErrInternal, ""),2624 },2625 {2626 name: "OP_TUCK",2627 pop: &parsedOpcode{2628 opcode: &opcodeArray[OP_TUCK],2629 data: nil,2630 },2631 expectedErr: nil,2632 },2633 {2634 name: "OP_TUCK long",2635 pop: &parsedOpcode{2636 opcode: &opcodeArray[OP_TUCK],2637 data: make([]byte, 1),2638 },2639 expectedErr: scriptError(ErrInternal, ""),2640 },2641 {2642 name: "OP_CAT",2643 pop: &parsedOpcode{2644 opcode: &opcodeArray[OP_CAT],2645 data: nil,2646 },2647 expectedErr: nil,2648 },2649 {2650 name: "OP_CAT long",2651 pop: &parsedOpcode{2652 opcode: &opcodeArray[OP_CAT],2653 data: make([]byte, 1),2654 },2655 expectedErr: scriptError(ErrInternal, ""),2656 },2657 {2658 name: "OP_SUBSTR",2659 pop: &parsedOpcode{2660 opcode: &opcodeArray[OP_SUBSTR],2661 data: nil,2662 },2663 expectedErr: nil,2664 },2665 {2666 name: "OP_SUBSTR long",2667 pop: &parsedOpcode{2668 opcode: &opcodeArray[OP_SUBSTR],2669 data: make([]byte, 1),2670 },2671 expectedErr: scriptError(ErrInternal, ""),2672 },2673 {2674 name: "OP_LEFT",2675 pop: &parsedOpcode{2676 opcode: &opcodeArray[OP_LEFT],2677 data: nil,2678 },2679 expectedErr: nil,2680 },2681 {2682 name: "OP_LEFT long",2683 pop: &parsedOpcode{2684 opcode: &opcodeArray[OP_LEFT],2685 data: make([]byte, 1),2686 },2687 expectedErr: scriptError(ErrInternal, ""),2688 },2689 {2690 name: "OP_LEFT",2691 pop: &parsedOpcode{2692 opcode: &opcodeArray[OP_LEFT],2693 data: nil,2694 },2695 expectedErr: nil,2696 },2697 {2698 name: "OP_LEFT long",2699 pop: &parsedOpcode{2700 opcode: &opcodeArray[OP_LEFT],2701 data: make([]byte, 1),2702 },2703 expectedErr: scriptError(ErrInternal, ""),2704 },2705 {2706 name: "OP_RIGHT",2707 pop: &parsedOpcode{2708 opcode: &opcodeArray[OP_RIGHT],2709 data: nil,2710 },2711 expectedErr: nil,2712 },2713 {2714 name: "OP_RIGHT long",2715 pop: &parsedOpcode{2716 opcode: &opcodeArray[OP_RIGHT],2717 data: make([]byte, 1),2718 },2719 expectedErr: scriptError(ErrInternal, ""),2720 },2721 {2722 name: "OP_SIZE",2723 pop: &parsedOpcode{2724 opcode: &opcodeArray[OP_SIZE],2725 data: nil,2726 },2727 expectedErr: nil,2728 },2729 {2730 name: "OP_SIZE long",2731 pop: &parsedOpcode{2732 opcode: &opcodeArray[OP_SIZE],2733 data: make([]byte, 1),2734 },2735 expectedErr: scriptError(ErrInternal, ""),2736 },2737 {2738 name: "OP_INVERT",2739 pop: &parsedOpcode{2740 opcode: &opcodeArray[OP_INVERT],2741 data: nil,2742 },2743 expectedErr: nil,2744 },2745 {2746 name: "OP_INVERT long",2747 pop: &parsedOpcode{2748 opcode: &opcodeArray[OP_INVERT],2749 data: make([]byte, 1),2750 },2751 expectedErr: scriptError(ErrInternal, ""),2752 },2753 {2754 name: "OP_AND",2755 pop: &parsedOpcode{2756 opcode: &opcodeArray[OP_AND],2757 data: nil,2758 },2759 expectedErr: nil,2760 },2761 {2762 name: "OP_AND long",2763 pop: &parsedOpcode{2764 opcode: &opcodeArray[OP_AND],2765 data: make([]byte, 1),2766 },2767 expectedErr: scriptError(ErrInternal, ""),2768 },2769 {2770 name: "OP_OR",2771 pop: &parsedOpcode{2772 opcode: &opcodeArray[OP_OR],2773 data: nil,2774 },2775 expectedErr: nil,2776 },2777 {2778 name: "OP_OR long",2779 pop: &parsedOpcode{2780 opcode: &opcodeArray[OP_OR],2781 data: make([]byte, 1),2782 },2783 expectedErr: scriptError(ErrInternal, ""),2784 },2785 {2786 name: "OP_XOR",2787 pop: &parsedOpcode{2788 opcode: &opcodeArray[OP_XOR],2789 data: nil,2790 },2791 expectedErr: nil,2792 },2793 {2794 name: "OP_XOR long",2795 pop: &parsedOpcode{2796 opcode: &opcodeArray[OP_XOR],2797 data: make([]byte, 1),2798 },2799 expectedErr: scriptError(ErrInternal, ""),2800 },2801 {2802 name: "OP_EQUAL",2803 pop: &parsedOpcode{2804 opcode: &opcodeArray[OP_EQUAL],2805 data: nil,2806 },2807 expectedErr: nil,2808 },2809 {2810 name: "OP_EQUAL long",2811 pop: &parsedOpcode{2812 opcode: &opcodeArray[OP_EQUAL],2813 data: make([]byte, 1),2814 },2815 expectedErr: scriptError(ErrInternal, ""),2816 },2817 {2818 name: "OP_EQUALVERIFY",2819 pop: &parsedOpcode{2820 opcode: &opcodeArray[OP_EQUALVERIFY],2821 data: nil,2822 },2823 expectedErr: nil,2824 },2825 {2826 name: "OP_EQUALVERIFY long",2827 pop: &parsedOpcode{2828 opcode: &opcodeArray[OP_EQUALVERIFY],2829 data: make([]byte, 1),2830 },2831 expectedErr: scriptError(ErrInternal, ""),2832 },2833 {2834 name: "OP_RESERVED1",2835 pop: &parsedOpcode{2836 opcode: &opcodeArray[OP_RESERVED1],2837 data: nil,2838 },2839 expectedErr: nil,2840 },2841 {2842 name: "OP_RESERVED1 long",2843 pop: &parsedOpcode{2844 opcode: &opcodeArray[OP_RESERVED1],2845 data: make([]byte, 1),2846 },2847 expectedErr: scriptError(ErrInternal, ""),2848 },2849 {2850 name: "OP_RESERVED2",2851 pop: &parsedOpcode{2852 opcode: &opcodeArray[OP_RESERVED2],2853 data: nil,2854 },2855 expectedErr: nil,2856 },2857 {2858 name: "OP_RESERVED2 long",2859 pop: &parsedOpcode{2860 opcode: &opcodeArray[OP_RESERVED2],2861 data: make([]byte, 1),2862 },2863 expectedErr: scriptError(ErrInternal, ""),2864 },2865 {2866 name: "OP_1ADD",2867 pop: &parsedOpcode{2868 opcode: &opcodeArray[OP_1ADD],2869 data: nil,2870 },2871 expectedErr: nil,2872 },2873 {2874 name: "OP_1ADD long",2875 pop: &parsedOpcode{2876 opcode: &opcodeArray[OP_1ADD],2877 data: make([]byte, 1),2878 },2879 expectedErr: scriptError(ErrInternal, ""),2880 },2881 {2882 name: "OP_1SUB",2883 pop: &parsedOpcode{2884 opcode: &opcodeArray[OP_1SUB],2885 data: nil,2886 },2887 expectedErr: nil,2888 },2889 {2890 name: "OP_1SUB long",2891 pop: &parsedOpcode{2892 opcode: &opcodeArray[OP_1SUB],2893 data: make([]byte, 1),2894 },2895 expectedErr: scriptError(ErrInternal, ""),2896 },2897 {2898 name: "OP_2MUL",2899 pop: &parsedOpcode{2900 opcode: &opcodeArray[OP_2MUL],2901 data: nil,2902 },2903 expectedErr: nil,2904 },2905 {2906 name: "OP_2MUL long",2907 pop: &parsedOpcode{2908 opcode: &opcodeArray[OP_2MUL],2909 data: make([]byte, 1),2910 },2911 expectedErr: scriptError(ErrInternal, ""),2912 },2913 {2914 name: "OP_2DIV",2915 pop: &parsedOpcode{2916 opcode: &opcodeArray[OP_2DIV],2917 data: nil,2918 },2919 expectedErr: nil,2920 },2921 {2922 name: "OP_2DIV long",2923 pop: &parsedOpcode{2924 opcode: &opcodeArray[OP_2DIV],2925 data: make([]byte, 1),2926 },2927 expectedErr: scriptError(ErrInternal, ""),2928 },2929 {2930 name: "OP_NEGATE",2931 pop: &parsedOpcode{2932 opcode: &opcodeArray[OP_NEGATE],2933 data: nil,2934 },2935 expectedErr: nil,2936 },2937 {2938 name: "OP_NEGATE long",2939 pop: &parsedOpcode{2940 opcode: &opcodeArray[OP_NEGATE],2941 data: make([]byte, 1),2942 },2943 expectedErr: scriptError(ErrInternal, ""),2944 },2945 {2946 name: "OP_ABS",2947 pop: &parsedOpcode{2948 opcode: &opcodeArray[OP_ABS],2949 data: nil,2950 },2951 expectedErr: nil,2952 },2953 {2954 name: "OP_ABS long",2955 pop: &parsedOpcode{2956 opcode: &opcodeArray[OP_ABS],2957 data: make([]byte, 1),2958 },2959 expectedErr: scriptError(ErrInternal, ""),2960 },2961 {2962 name: "OP_NOT",2963 pop: &parsedOpcode{2964 opcode: &opcodeArray[OP_NOT],2965 data: nil,2966 },2967 expectedErr: nil,2968 },2969 {2970 name: "OP_NOT long",2971 pop: &parsedOpcode{2972 opcode: &opcodeArray[OP_NOT],2973 data: make([]byte, 1),2974 },2975 expectedErr: scriptError(ErrInternal, ""),2976 },2977 {2978 name: "OP_0NOTEQUAL",2979 pop: &parsedOpcode{2980 opcode: &opcodeArray[OP_0NOTEQUAL],2981 data: nil,2982 },2983 expectedErr: nil,2984 },2985 {2986 name: "OP_0NOTEQUAL long",2987 pop: &parsedOpcode{2988 opcode: &opcodeArray[OP_0NOTEQUAL],2989 data: make([]byte, 1),2990 },2991 expectedErr: scriptError(ErrInternal, ""),2992 },2993 {2994 name: "OP_ADD",2995 pop: &parsedOpcode{2996 opcode: &opcodeArray[OP_ADD],2997 data: nil,2998 },2999 expectedErr: nil,3000 },3001 {3002 name: "OP_ADD long",3003 pop: &parsedOpcode{3004 opcode: &opcodeArray[OP_ADD],3005 data: make([]byte, 1),3006 },3007 expectedErr: scriptError(ErrInternal, ""),3008 },3009 {3010 name: "OP_SUB",3011 pop: &parsedOpcode{3012 opcode: &opcodeArray[OP_SUB],3013 data: nil,3014 },3015 expectedErr: nil,3016 },3017 {3018 name: "OP_SUB long",3019 pop: &parsedOpcode{3020 opcode: &opcodeArray[OP_SUB],3021 data: make([]byte, 1),3022 },3023 expectedErr: scriptError(ErrInternal, ""),3024 },3025 {3026 name: "OP_MUL",3027 pop: &parsedOpcode{3028 opcode: &opcodeArray[OP_MUL],3029 data: nil,3030 },3031 expectedErr: nil,3032 },3033 {3034 name: "OP_MUL long",3035 pop: &parsedOpcode{3036 opcode: &opcodeArray[OP_MUL],3037 data: make([]byte, 1),3038 },3039 expectedErr: scriptError(ErrInternal, ""),3040 },3041 {3042 name: "OP_DIV",3043 pop: &parsedOpcode{3044 opcode: &opcodeArray[OP_DIV],3045 data: nil,3046 },3047 expectedErr: nil,3048 },3049 {3050 name: "OP_DIV long",3051 pop: &parsedOpcode{3052 opcode: &opcodeArray[OP_DIV],3053 data: make([]byte, 1),3054 },3055 expectedErr: scriptError(ErrInternal, ""),3056 },3057 {3058 name: "OP_MOD",3059 pop: &parsedOpcode{3060 opcode: &opcodeArray[OP_MOD],3061 data: nil,3062 },3063 expectedErr: nil,3064 },3065 {3066 name: "OP_MOD long",3067 pop: &parsedOpcode{3068 opcode: &opcodeArray[OP_MOD],3069 data: make([]byte, 1),3070 },3071 expectedErr: scriptError(ErrInternal, ""),3072 },3073 {3074 name: "OP_LSHIFT",3075 pop: &parsedOpcode{3076 opcode: &opcodeArray[OP_LSHIFT],3077 data: nil,3078 },3079 expectedErr: nil,3080 },3081 {3082 name: "OP_LSHIFT long",3083 pop: &parsedOpcode{3084 opcode: &opcodeArray[OP_LSHIFT],3085 data: make([]byte, 1),3086 },3087 expectedErr: scriptError(ErrInternal, ""),3088 },3089 {3090 name: "OP_RSHIFT",3091 pop: &parsedOpcode{3092 opcode: &opcodeArray[OP_RSHIFT],3093 data: nil,3094 },3095 expectedErr: nil,3096 },3097 {3098 name: "OP_RSHIFT long",3099 pop: &parsedOpcode{3100 opcode: &opcodeArray[OP_RSHIFT],3101 data: make([]byte, 1),3102 },3103 expectedErr: scriptError(ErrInternal, ""),3104 },3105 {3106 name: "OP_BOOLAND",3107 pop: &parsedOpcode{3108 opcode: &opcodeArray[OP_BOOLAND],3109 data: nil,3110 },3111 expectedErr: nil,3112 },3113 {3114 name: "OP_BOOLAND long",3115 pop: &parsedOpcode{3116 opcode: &opcodeArray[OP_BOOLAND],3117 data: make([]byte, 1),3118 },3119 expectedErr: scriptError(ErrInternal, ""),3120 },3121 {3122 name: "OP_BOOLOR",3123 pop: &parsedOpcode{3124 opcode: &opcodeArray[OP_BOOLOR],3125 data: nil,3126 },3127 expectedErr: nil,3128 },3129 {3130 name: "OP_BOOLOR long",3131 pop: &parsedOpcode{3132 opcode: &opcodeArray[OP_BOOLOR],3133 data: make([]byte, 1),3134 },3135 expectedErr: scriptError(ErrInternal, ""),3136 },3137 {3138 name: "OP_NUMEQUAL",3139 pop: &parsedOpcode{3140 opcode: &opcodeArray[OP_NUMEQUAL],3141 data: nil,3142 },3143 expectedErr: nil,3144 },3145 {3146 name: "OP_NUMEQUAL long",3147 pop: &parsedOpcode{3148 opcode: &opcodeArray[OP_NUMEQUAL],3149 data: make([]byte, 1),3150 },3151 expectedErr: scriptError(ErrInternal, ""),3152 },3153 {3154 name: "OP_NUMEQUALVERIFY",3155 pop: &parsedOpcode{3156 opcode: &opcodeArray[OP_NUMEQUALVERIFY],3157 data: nil,3158 },3159 expectedErr: nil,3160 },3161 {3162 name: "OP_NUMEQUALVERIFY long",3163 pop: &parsedOpcode{3164 opcode: &opcodeArray[OP_NUMEQUALVERIFY],3165 data: make([]byte, 1),3166 },3167 expectedErr: scriptError(ErrInternal, ""),3168 },3169 {3170 name: "OP_NUMNOTEQUAL",3171 pop: &parsedOpcode{3172 opcode: &opcodeArray[OP_NUMNOTEQUAL],3173 data: nil,3174 },3175 expectedErr: nil,3176 },3177 {3178 name: "OP_NUMNOTEQUAL long",3179 pop: &parsedOpcode{3180 opcode: &opcodeArray[OP_NUMNOTEQUAL],3181 data: make([]byte, 1),3182 },3183 expectedErr: scriptError(ErrInternal, ""),3184 },3185 {3186 name: "OP_LESSTHAN",3187 pop: &parsedOpcode{3188 opcode: &opcodeArray[OP_LESSTHAN],3189 data: nil,3190 },3191 expectedErr: nil,3192 },3193 {3194 name: "OP_LESSTHAN long",3195 pop: &parsedOpcode{3196 opcode: &opcodeArray[OP_LESSTHAN],3197 data: make([]byte, 1),3198 },3199 expectedErr: scriptError(ErrInternal, ""),3200 },3201 {3202 name: "OP_GREATERTHAN",3203 pop: &parsedOpcode{3204 opcode: &opcodeArray[OP_GREATERTHAN],3205 data: nil,3206 },3207 expectedErr: nil,3208 },3209 {3210 name: "OP_GREATERTHAN long",3211 pop: &parsedOpcode{3212 opcode: &opcodeArray[OP_GREATERTHAN],3213 data: make([]byte, 1),3214 },3215 expectedErr: scriptError(ErrInternal, ""),3216 },3217 {3218 name: "OP_LESSTHANOREQUAL",3219 pop: &parsedOpcode{3220 opcode: &opcodeArray[OP_LESSTHANOREQUAL],3221 data: nil,3222 },3223 expectedErr: nil,3224 },3225 {3226 name: "OP_LESSTHANOREQUAL long",3227 pop: &parsedOpcode{3228 opcode: &opcodeArray[OP_LESSTHANOREQUAL],3229 data: make([]byte, 1),3230 },3231 expectedErr: scriptError(ErrInternal, ""),3232 },3233 {3234 name: "OP_GREATERTHANOREQUAL",3235 pop: &parsedOpcode{3236 opcode: &opcodeArray[OP_GREATERTHANOREQUAL],3237 data: nil,3238 },3239 expectedErr: nil,3240 },3241 {3242 name: "OP_GREATERTHANOREQUAL long",3243 pop: &parsedOpcode{3244 opcode: &opcodeArray[OP_GREATERTHANOREQUAL],3245 data: make([]byte, 1),3246 },3247 expectedErr: scriptError(ErrInternal, ""),3248 },3249 {3250 name: "OP_MIN",3251 pop: &parsedOpcode{3252 opcode: &opcodeArray[OP_MIN],3253 data: nil,3254 },3255 expectedErr: nil,3256 },3257 {3258 name: "OP_MIN long",3259 pop: &parsedOpcode{3260 opcode: &opcodeArray[OP_MIN],3261 data: make([]byte, 1),3262 },3263 expectedErr: scriptError(ErrInternal, ""),3264 },3265 {3266 name: "OP_MAX",3267 pop: &parsedOpcode{3268 opcode: &opcodeArray[OP_MAX],3269 data: nil,3270 },3271 expectedErr: nil,3272 },3273 {3274 name: "OP_MAX long",3275 pop: &parsedOpcode{3276 opcode: &opcodeArray[OP_MAX],3277 data: make([]byte, 1),3278 },3279 expectedErr: scriptError(ErrInternal, ""),3280 },3281 {3282 name: "OP_WITHIN",3283 pop: &parsedOpcode{3284 opcode: &opcodeArray[OP_WITHIN],3285 data: nil,3286 },3287 expectedErr: nil,3288 },3289 {3290 name: "OP_WITHIN long",3291 pop: &parsedOpcode{3292 opcode: &opcodeArray[OP_WITHIN],3293 data: make([]byte, 1),3294 },3295 expectedErr: scriptError(ErrInternal, ""),3296 },3297 {3298 name: "OP_RIPEMD160",3299 pop: &parsedOpcode{3300 opcode: &opcodeArray[OP_RIPEMD160],3301 data: nil,3302 },3303 expectedErr: nil,3304 },3305 {3306 name: "OP_RIPEMD160 long",3307 pop: &parsedOpcode{3308 opcode: &opcodeArray[OP_RIPEMD160],3309 data: make([]byte, 1),3310 },3311 expectedErr: scriptError(ErrInternal, ""),3312 },3313 {3314 name: "OP_SHA1",3315 pop: &parsedOpcode{3316 opcode: &opcodeArray[OP_SHA1],3317 data: nil,3318 },3319 expectedErr: nil,3320 },3321 {3322 name: "OP_SHA1 long",3323 pop: &parsedOpcode{3324 opcode: &opcodeArray[OP_SHA1],3325 data: make([]byte, 1),3326 },3327 expectedErr: scriptError(ErrInternal, ""),3328 },3329 {3330 name: "OP_SHA256",3331 pop: &parsedOpcode{3332 opcode: &opcodeArray[OP_SHA256],3333 data: nil,3334 },3335 expectedErr: nil,3336 },3337 {3338 name: "OP_SHA256 long",3339 pop: &parsedOpcode{3340 opcode: &opcodeArray[OP_SHA256],3341 data: make([]byte, 1),3342 },3343 expectedErr: scriptError(ErrInternal, ""),3344 },3345 {3346 name: "OP_HASH160",3347 pop: &parsedOpcode{3348 opcode: &opcodeArray[OP_HASH160],3349 data: nil,3350 },3351 expectedErr: nil,3352 },3353 {3354 name: "OP_HASH160 long",3355 pop: &parsedOpcode{3356 opcode: &opcodeArray[OP_HASH160],3357 data: make([]byte, 1),3358 },3359 expectedErr: scriptError(ErrInternal, ""),3360 },3361 {3362 name: "OP_HASH256",3363 pop: &parsedOpcode{3364 opcode: &opcodeArray[OP_HASH256],3365 data: nil,3366 },3367 expectedErr: nil,3368 },3369 {3370 name: "OP_HASH256 long",3371 pop: &parsedOpcode{3372 opcode: &opcodeArray[OP_HASH256],3373 data: make([]byte, 1),3374 },3375 expectedErr: scriptError(ErrInternal, ""),3376 },3377 {3378 name: "OP_CODESAPERATOR",3379 pop: &parsedOpcode{3380 opcode: &opcodeArray[OP_CODESEPARATOR],3381 data: nil,3382 },3383 expectedErr: nil,3384 },3385 {3386 name: "OP_CODESEPARATOR long",3387 pop: &parsedOpcode{3388 opcode: &opcodeArray[OP_CODESEPARATOR],3389 data: make([]byte, 1),3390 },3391 expectedErr: scriptError(ErrInternal, ""),3392 },3393 {3394 name: "OP_CHECKSIG",3395 pop: &parsedOpcode{3396 opcode: &opcodeArray[OP_CHECKSIG],3397 data: nil,3398 },3399 expectedErr: nil,3400 },3401 {3402 name: "OP_CHECKSIG long",3403 pop: &parsedOpcode{3404 opcode: &opcodeArray[OP_CHECKSIG],3405 data: make([]byte, 1),3406 },3407 expectedErr: scriptError(ErrInternal, ""),3408 },3409 {3410 name: "OP_CHECKSIGVERIFY",3411 pop: &parsedOpcode{3412 opcode: &opcodeArray[OP_CHECKSIGVERIFY],3413 data: nil,3414 },3415 expectedErr: nil,3416 },3417 {3418 name: "OP_CHECKSIGVERIFY long",3419 pop: &parsedOpcode{3420 opcode: &opcodeArray[OP_CHECKSIGVERIFY],3421 data: make([]byte, 1),3422 },3423 expectedErr: scriptError(ErrInternal, ""),3424 },3425 {3426 name: "OP_CHECKMULTISIG",3427 pop: &parsedOpcode{3428 opcode: &opcodeArray[OP_CHECKMULTISIG],3429 data: nil,3430 },3431 expectedErr: nil,3432 },3433 {3434 name: "OP_CHECKMULTISIG long",3435 pop: &parsedOpcode{3436 opcode: &opcodeArray[OP_CHECKMULTISIG],3437 data: make([]byte, 1),3438 },3439 expectedErr: scriptError(ErrInternal, ""),3440 },3441 {3442 name: "OP_CHECKMULTISIGVERIFY",3443 pop: &parsedOpcode{3444 opcode: &opcodeArray[OP_CHECKMULTISIGVERIFY],3445 data: nil,3446 },3447 expectedErr: nil,3448 },3449 {3450 name: "OP_CHECKMULTISIGVERIFY long",3451 pop: &parsedOpcode{3452 opcode: &opcodeArray[OP_CHECKMULTISIGVERIFY],3453 data: make([]byte, 1),3454 },3455 expectedErr: scriptError(ErrInternal, ""),3456 },3457 {3458 name: "OP_NOP1",3459 pop: &parsedOpcode{3460 opcode: &opcodeArray[OP_NOP1],3461 data: nil,3462 },3463 expectedErr: nil,3464 },3465 {3466 name: "OP_NOP1 long",3467 pop: &parsedOpcode{3468 opcode: &opcodeArray[OP_NOP1],3469 data: make([]byte, 1),3470 },3471 expectedErr: scriptError(ErrInternal, ""),3472 },3473 {3474 name: "OP_NOP2",3475 pop: &parsedOpcode{3476 opcode: &opcodeArray[OP_NOP2],3477 data: nil,3478 },3479 expectedErr: nil,3480 },3481 {3482 name: "OP_NOP2 long",3483 pop: &parsedOpcode{3484 opcode: &opcodeArray[OP_NOP2],3485 data: make([]byte, 1),3486 },3487 expectedErr: scriptError(ErrInternal, ""),3488 },3489 {3490 name: "OP_NOP3",3491 pop: &parsedOpcode{3492 opcode: &opcodeArray[OP_NOP3],3493 data: nil,3494 },3495 expectedErr: nil,3496 },3497 {3498 name: "OP_NOP3 long",3499 pop: &parsedOpcode{3500 opcode: &opcodeArray[OP_NOP3],3501 data: make([]byte, 1),3502 },3503 expectedErr: scriptError(ErrInternal, ""),3504 },3505 {3506 name: "OP_NOP4",3507 pop: &parsedOpcode{3508 opcode: &opcodeArray[OP_NOP4],3509 data: nil,3510 },3511 expectedErr: nil,3512 },3513 {3514 name: "OP_NOP4 long",3515 pop: &parsedOpcode{3516 opcode: &opcodeArray[OP_NOP4],3517 data: make([]byte, 1),3518 },3519 expectedErr: scriptError(ErrInternal, ""),3520 },3521 {3522 name: "OP_NOP5",3523 pop: &parsedOpcode{3524 opcode: &opcodeArray[OP_NOP5],3525 data: nil,3526 },3527 expectedErr: nil,3528 },3529 {3530 name: "OP_NOP5 long",3531 pop: &parsedOpcode{3532 opcode: &opcodeArray[OP_NOP5],3533 data: make([]byte, 1),3534 },3535 expectedErr: scriptError(ErrInternal, ""),3536 },3537 {3538 name: "OP_NOP6",3539 pop: &parsedOpcode{3540 opcode: &opcodeArray[OP_NOP6],3541 data: nil,3542 },3543 expectedErr: nil,3544 },3545 {3546 name: "OP_NOP6 long",3547 pop: &parsedOpcode{3548 opcode: &opcodeArray[OP_NOP6],3549 data: make([]byte, 1),3550 },3551 expectedErr: scriptError(ErrInternal, ""),3552 },3553 {3554 name: "OP_NOP7",3555 pop: &parsedOpcode{3556 opcode: &opcodeArray[OP_NOP7],3557 data: nil,3558 },3559 expectedErr: nil,3560 },3561 {3562 name: "OP_NOP7 long",3563 pop: &parsedOpcode{3564 opcode: &opcodeArray[OP_NOP7],3565 data: make([]byte, 1),3566 },3567 expectedErr: scriptError(ErrInternal, ""),3568 },3569 {3570 name: "OP_NOP8",3571 pop: &parsedOpcode{3572 opcode: &opcodeArray[OP_NOP8],3573 data: nil,3574 },3575 expectedErr: nil,3576 },3577 {3578 name: "OP_NOP8 long",3579 pop: &parsedOpcode{3580 opcode: &opcodeArray[OP_NOP8],3581 data: make([]byte, 1),3582 },3583 expectedErr: scriptError(ErrInternal, ""),3584 },3585 {3586 name: "OP_NOP9",3587 pop: &parsedOpcode{3588 opcode: &opcodeArray[OP_NOP9],3589 data: nil,3590 },3591 expectedErr: nil,3592 },3593 {3594 name: "OP_NOP9 long",3595 pop: &parsedOpcode{3596 opcode: &opcodeArray[OP_NOP9],3597 data: make([]byte, 1),3598 },3599 expectedErr: scriptError(ErrInternal, ""),3600 },3601 {3602 name: "OP_NOP10",3603 pop: &parsedOpcode{3604 opcode: &opcodeArray[OP_NOP10],3605 data: nil,3606 },3607 expectedErr: nil,3608 },3609 {3610 name: "OP_NOP10 long",3611 pop: &parsedOpcode{3612 opcode: &opcodeArray[OP_NOP10],3613 data: make([]byte, 1),3614 },3615 expectedErr: scriptError(ErrInternal, ""),3616 },3617 {3618 name: "OP_PUBKEYHASH",3619 pop: &parsedOpcode{3620 opcode: &opcodeArray[OP_PUBKEYHASH],3621 data: nil,3622 },3623 expectedErr: nil,3624 },3625 {3626 name: "OP_PUBKEYHASH long",3627 pop: &parsedOpcode{3628 opcode: &opcodeArray[OP_PUBKEYHASH],3629 data: make([]byte, 1),3630 },3631 expectedErr: scriptError(ErrInternal, ""),3632 },3633 {3634 name: "OP_PUBKEY",3635 pop: &parsedOpcode{3636 opcode: &opcodeArray[OP_PUBKEY],3637 data: nil,3638 },3639 expectedErr: nil,3640 },3641 {3642 name: "OP_PUBKEY long",3643 pop: &parsedOpcode{3644 opcode: &opcodeArray[OP_PUBKEY],3645 data: make([]byte, 1),3646 },3647 expectedErr: scriptError(ErrInternal, ""),3648 },3649 {3650 name: "OP_INVALIDOPCODE",3651 pop: &parsedOpcode{3652 opcode: &opcodeArray[OP_INVALIDOPCODE],3653 data: nil,3654 },3655 expectedErr: nil,3656 },3657 {3658 name: "OP_INVALIDOPCODE long",3659 pop: &parsedOpcode{3660 opcode: &opcodeArray[OP_INVALIDOPCODE],3661 data: make([]byte, 1),3662 },3663 expectedErr: scriptError(ErrInternal, ""),3664 },3665 }3666 for _, test := range tests {3667 _, err := test.pop.bytes()3668 if e := tstCheckScriptError(err, test.expectedErr); e != nil {3669 t.Errorf("Parsed opcode test '%s': %v", test.name, e)3670 continue3671 }3672 }3673}3674// TestPushedData ensured the PushedData function extracts the expected data out3675// of various scripts.3676func TestPushedData(t *testing.T) {3677 t.Parallel()3678 var tests = []struct {3679 script string3680 out [][]byte3681 valid bool3682 }{3683 {3684 "0 IF 0 ELSE 2 ENDIF",3685 [][]byte{nil, nil},3686 true,3687 },3688 {3689 "16777216 10000000",3690 [][]byte{3691 {0x00, 0x00, 0x00, 0x01}, // 167772163692 {0x80, 0x96, 0x98, 0x00}, // 100000003693 },3694 true,3695 },3696 {3697 "DUP HASH160 '17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhem' EQUALVERIFY CHECKSIG",3698 [][]byte{3699 // 17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhem3700 {3701 0x31, 0x37, 0x56, 0x5a, 0x4e, 0x58, 0x31, 0x53, 0x4e, 0x35,3702 0x4e, 0x74, 0x4b, 0x61, 0x38, 0x55, 0x51, 0x46, 0x78, 0x77,3703 0x51, 0x62, 0x46, 0x65, 0x46, 0x63, 0x33, 0x69, 0x71, 0x52,3704 0x59, 0x68, 0x65, 0x6d,3705 },3706 },3707 true,3708 },3709 {3710 "PUSHDATA4 1000 EQUAL",3711 nil,3712 false,3713 },3714 }3715 for i, test := range tests {3716 script := mustParseShortForm(test.script)3717 data, err := PushedData(script)3718 if test.valid && err != nil {3719 t.Errorf("TestPushedData failed test #%d: %v\n", i, err)3720 continue3721 } else if !test.valid && err == nil {3722 t.Errorf("TestPushedData failed test #%d: test should "+3723 "be invalid\n", i)3724 continue3725 }3726 if !reflect.DeepEqual(data, test.out) {3727 t.Errorf("TestPushedData failed test #%d: want: %x "+3728 "got: %x\n", i, test.out, data)3729 }3730 }3731}3732// TestHasCanonicalPush ensures the canonicalPush function works as expected.3733func TestHasCanonicalPush(t *testing.T) {3734 t.Parallel()3735 for i := 0; i < 65535; i++ {3736 script, err := NewScriptBuilder().AddInt64(int64(i)).Script()3737 if err != nil {3738 t.Errorf("Script: test #%d unexpected error: %v\n", i,3739 err)3740 continue3741 }3742 if result := IsPushOnlyScript(script); !result {3743 t.Errorf("IsPushOnlyScript: test #%d failed: %x\n", i,3744 script)3745 continue3746 }3747 pops, err := parseScript(script)3748 if err != nil {3749 t.Errorf("parseScript: #%d failed: %v", i, err)3750 continue3751 }3752 for _, pop := range pops {3753 if result := canonicalPush(pop); !result {3754 t.Errorf("canonicalPush: test #%d failed: %x\n",3755 i, script)3756 break3757 }3758 }3759 }3760 for i := 0; i <= MaxScriptElementSize; i++ {3761 builder := NewScriptBuilder()3762 builder.AddData(bytes.Repeat([]byte{0x49}, i))3763 script, err := builder.Script()3764 if err != nil {3765 t.Errorf("StandardPushesTests test #%d unexpected error: %v\n", i, err)3766 continue3767 }3768 if result := IsPushOnlyScript(script); !result {3769 t.Errorf("StandardPushesTests IsPushOnlyScript test #%d failed: %x\n", i, script)3770 continue3771 }3772 pops, err := parseScript(script)3773 if err != nil {3774 t.Errorf("StandardPushesTests #%d failed to TstParseScript: %v", i, err)3775 continue3776 }3777 for _, pop := range pops {3778 if result := canonicalPush(pop); !result {3779 t.Errorf("StandardPushesTests TstHasCanonicalPushes test #%d failed: %x\n", i, script)3780 break3781 }3782 }3783 }3784}3785// TestGetPreciseSigOps ensures the more precise signature operation counting3786// mechanism which includes signatures in P2SH scripts works as expected.3787func TestGetPreciseSigOps(t *testing.T) {3788 t.Parallel()3789 tests := []struct {3790 name string3791 scriptSig []byte3792 nSigOps int3793 }{3794 {3795 name: "scriptSig doesn't parse",3796 scriptSig: mustParseShortForm("PUSHDATA1 0x02"),3797 },3798 {3799 name: "scriptSig isn't push only",3800 scriptSig: mustParseShortForm("1 DUP"),3801 nSigOps: 0,3802 },3803 {3804 name: "scriptSig length 0",3805 scriptSig: nil,3806 nSigOps: 0,3807 },3808 {3809 name: "No script at the end",3810 // No script at end but still push only.3811 scriptSig: mustParseShortForm("1 1"),3812 nSigOps: 0,3813 },3814 {3815 name: "pushed script doesn't parse",3816 scriptSig: mustParseShortForm("DATA_2 PUSHDATA1 0x02"),3817 },3818 }3819 // The signature in the p2sh script is nonsensical for the tests since3820 // this script will never be executed. What matters is that it matches3821 // the right pattern.3822 pkScript := mustParseShortForm("HASH160 DATA_20 0x433ec2ac1ffa1b7b7d0" +3823 "27f564529c57197f9ae88 EQUAL")3824 for _, test := range tests {3825 count := GetPreciseSigOpCount(test.scriptSig, pkScript, true)3826 if count != test.nSigOps {3827 t.Errorf("%s: expected count of %d, got %d", test.name,3828 test.nSigOps, count)3829 }3830 }3831}3832// TestGetWitnessSigOpCount tests that the sig op counting for p2wkh, p2wsh,3833// nested p2sh, and invalid variants are counted properly.3834func TestGetWitnessSigOpCount(t *testing.T) {3835 t.Parallel()3836 tests := []struct {3837 name string3838 sigScript []byte3839 pkScript []byte3840 witness wire.TxWitness3841 numSigOps int3842 }{3843 // A regualr p2wkh witness program. The output being spent3844 // should only have a single sig-op counted.3845 {3846 name: "p2wkh",3847 pkScript: mustParseShortForm("OP_0 DATA_20 " +3848 "0x365ab47888e150ff46f8d51bce36dcd680f1283f"),3849 witness: wire.TxWitness{3850 hexToBytes("3045022100ee9fe8f9487afa977" +3851 "6647ebcf0883ce0cd37454d7ce19889d34ba2c9" +3852 "9ce5a9f402200341cb469d0efd3955acb9e46" +3853 "f568d7e2cc10f9084aaff94ced6dc50a59134ad01"),3854 hexToBytes("03f0000d0639a22bfaf217e4c9428" +3855 "9c2b0cc7fa1036f7fd5d9f61a9d6ec153100e"),3856 },3857 numSigOps: 1,3858 },3859 // A p2wkh witness program nested within a p2sh output script.3860 // The pattern should be recognized properly and attribute only3861 // a single sig op.3862 {3863 name: "nested p2sh",3864 sigScript: hexToBytes("160014ad0ffa2e387f07" +3865 "e7ead14dc56d5a97dbd6ff5a23"),3866 pkScript: mustParseShortForm("HASH160 DATA_20 " +3867 "0xb3a84b564602a9d68b4c9f19c2ea61458ff7826c EQUAL"),3868 witness: wire.TxWitness{3869 hexToBytes("3045022100cb1c2ac1ff1d57d" +3870 "db98f7bdead905f8bf5bcc8641b029ce8eef25" +3871 "c75a9e22a4702203be621b5c86b771288706be5" +3872 "a7eee1db4fceabf9afb7583c1cc6ee3f8297b21201"),3873 hexToBytes("03f0000d0639a22bfaf217e4c9" +3874 "4289c2b0cc7fa1036f7fd5d9f61a9d6ec153100e"),3875 },3876 numSigOps: 1,3877 },3878 // A p2sh script that spends a 2-of-2 multi-sig output.3879 {3880 name: "p2wsh multi-sig spend",3881 numSigOps: 2,3882 pkScript: hexToBytes("0020e112b88a0cd87ba387f" +3883 "449d443ee2596eb353beb1f0351ab2cba8909d875db23"),3884 witness: wire.TxWitness{3885 hexToBytes("522103b05faca7ceda92b493" +3886 "3f7acdf874a93de0dc7edc461832031cd69cbb1d1e" +3887 "6fae2102e39092e031c1621c902e3704424e8d8" +3888 "3ca481d4d4eeae1b7970f51c78231207e52ae"),3889 },3890 },3891 // A p2wsh witness program. However, the witness script fails3892 // to parse after the valid portion of the script. As a result,3893 // the valid portion of the script should still be counted.3894 {3895 name: "witness script doesn't parse",3896 numSigOps: 1,3897 pkScript: hexToBytes("0020e112b88a0cd87ba387f44" +3898 "9d443ee2596eb353beb1f0351ab2cba8909d875db23"),3899 witness: wire.TxWitness{3900 mustParseShortForm("DUP HASH160 " +3901 "'17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhem'" +3902 " EQUALVERIFY CHECKSIG DATA_20 0x91"),3903 },3904 },3905 }3906 for _, test := range tests {3907 count := GetWitnessSigOpCount(test.sigScript, test.pkScript,3908 test.witness)3909 if count != test.numSigOps {3910 t.Errorf("%s: expected count of %d, got %d", test.name,3911 test.numSigOps, count)3912 }3913 }3914}3915// TestRemoveOpcodes ensures that removing opcodes from scripts behaves as3916// expected.3917func TestRemoveOpcodes(t *testing.T) {3918 t.Parallel()3919 tests := []struct {3920 name string3921 before string3922 remove byte3923 err error3924 after string3925 }{3926 {3927 // Nothing to remove.3928 name: "nothing to remove",3929 before: "NOP",3930 remove: OP_CODESEPARATOR,3931 after: "NOP",3932 },3933 {3934 // Test basic opcode removal.3935 name: "codeseparator 1",3936 before: "NOP CODESEPARATOR TRUE",3937 remove: OP_CODESEPARATOR,3938 after: "NOP TRUE",3939 },3940 {3941 // The opcode in question is actually part of the data3942 // in a previous opcode.3943 name: "codeseparator by coincidence",3944 before: "NOP DATA_1 CODESEPARATOR TRUE",3945 remove: OP_CODESEPARATOR,3946 after: "NOP DATA_1 CODESEPARATOR TRUE",3947 },3948 {3949 name: "invalid opcode",3950 before: "CAT",3951 remove: OP_CODESEPARATOR,3952 after: "CAT",3953 },3954 {3955 name: "invalid length (instruction)",3956 before: "PUSHDATA1",3957 remove: OP_CODESEPARATOR,3958 err: scriptError(ErrMalformedPush, ""),3959 },3960 {3961 name: "invalid length (data)",3962 before: "PUSHDATA1 0xff 0xfe",3963 remove: OP_CODESEPARATOR,3964 err: scriptError(ErrMalformedPush, ""),3965 },3966 }3967 // tstRemoveOpcode is a convenience function to parse the provided3968 // raw script, remove the passed opcode, then unparse the result back3969 // into a raw script.3970 tstRemoveOpcode := func(script []byte, opcode byte) ([]byte, error) {3971 pops, err := parseScript(script)3972 if err != nil {3973 return nil, err3974 }3975 pops = removeOpcode(pops, opcode)3976 return unparseScript(pops)3977 }3978 for _, test := range tests {3979 before := mustParseShortForm(test.before)3980 after := mustParseShortForm(test.after)3981 result, err := tstRemoveOpcode(before, test.remove)3982 if e := tstCheckScriptError(err, test.err); e != nil {3983 t.Errorf("%s: %v", test.name, e)3984 continue3985 }3986 if !bytes.Equal(after, result) {3987 t.Errorf("%s: value does not equal expected: exp: %q"+3988 " got: %q", test.name, after, result)3989 }3990 }3991}3992// TestRemoveOpcodeByData ensures that removing data carrying opcodes based on3993// the data they contain works as expected.3994func TestRemoveOpcodeByData(t *testing.T) {3995 t.Parallel()3996 tests := []struct {3997 name string3998 before []byte3999 remove []byte4000 err error4001 after []byte4002 }{4003 {4004 name: "nothing to do",4005 before: []byte{OP_NOP},4006 remove: []byte{1, 2, 3, 4},4007 after: []byte{OP_NOP},4008 },4009 {4010 name: "simple case",4011 before: []byte{OP_DATA_4, 1, 2, 3, 4},4012 remove: []byte{1, 2, 3, 4},4013 after: nil,4014 },4015 {4016 name: "simple case (miss)",4017 before: []byte{OP_DATA_4, 1, 2, 3, 4},4018 remove: []byte{1, 2, 3, 5},4019 after: []byte{OP_DATA_4, 1, 2, 3, 4},4020 },4021 {4022 // padded to keep it canonical.4023 name: "simple case (pushdata1)",4024 before: append(append([]byte{OP_PUSHDATA1, 76},4025 bytes.Repeat([]byte{0}, 72)...),4026 []byte{1, 2, 3, 4}...),4027 remove: []byte{1, 2, 3, 4},4028 after: nil,4029 },4030 {4031 name: "simple case (pushdata1 miss)",4032 before: append(append([]byte{OP_PUSHDATA1, 76},4033 bytes.Repeat([]byte{0}, 72)...),4034 []byte{1, 2, 3, 4}...),4035 remove: []byte{1, 2, 3, 5},4036 after: append(append([]byte{OP_PUSHDATA1, 76},4037 bytes.Repeat([]byte{0}, 72)...),4038 []byte{1, 2, 3, 4}...),4039 },4040 {4041 name: "simple case (pushdata1 miss noncanonical)",4042 before: []byte{OP_PUSHDATA1, 4, 1, 2, 3, 4},4043 remove: []byte{1, 2, 3, 4},4044 after: []byte{OP_PUSHDATA1, 4, 1, 2, 3, 4},4045 },4046 {4047 name: "simple case (pushdata2)",4048 before: append(append([]byte{OP_PUSHDATA2, 0, 1},4049 bytes.Repeat([]byte{0}, 252)...),4050 []byte{1, 2, 3, 4}...),4051 remove: []byte{1, 2, 3, 4},4052 after: nil,4053 },4054 {4055 name: "simple case (pushdata2 miss)",4056 before: append(append([]byte{OP_PUSHDATA2, 0, 1},4057 bytes.Repeat([]byte{0}, 252)...),4058 []byte{1, 2, 3, 4}...),4059 remove: []byte{1, 2, 3, 4, 5},4060 after: append(append([]byte{OP_PUSHDATA2, 0, 1},4061 bytes.Repeat([]byte{0}, 252)...),4062 []byte{1, 2, 3, 4}...),4063 },4064 {4065 name: "simple case (pushdata2 miss noncanonical)",4066 before: []byte{OP_PUSHDATA2, 4, 0, 1, 2, 3, 4},4067 remove: []byte{1, 2, 3, 4},4068 after: []byte{OP_PUSHDATA2, 4, 0, 1, 2, 3, 4},4069 },4070 {4071 // This is padded to make the push canonical.4072 name: "simple case (pushdata4)",4073 before: append(append([]byte{OP_PUSHDATA4, 0, 0, 1, 0},4074 bytes.Repeat([]byte{0}, 65532)...),4075 []byte{1, 2, 3, 4}...),4076 remove: []byte{1, 2, 3, 4},4077 after: nil,4078 },4079 {4080 name: "simple case (pushdata4 miss noncanonical)",4081 before: []byte{OP_PUSHDATA4, 4, 0, 0, 0, 1, 2, 3, 4},4082 remove: []byte{1, 2, 3, 4},4083 after: []byte{OP_PUSHDATA4, 4, 0, 0, 0, 1, 2, 3, 4},4084 },4085 {4086 // This is padded to make the push canonical.4087 name: "simple case (pushdata4 miss)",4088 before: append(append([]byte{OP_PUSHDATA4, 0, 0, 1, 0},4089 bytes.Repeat([]byte{0}, 65532)...), []byte{1, 2, 3, 4}...),4090 remove: []byte{1, 2, 3, 4, 5},4091 after: append(append([]byte{OP_PUSHDATA4, 0, 0, 1, 0},4092 bytes.Repeat([]byte{0}, 65532)...), []byte{1, 2, 3, 4}...),4093 },4094 {4095 name: "invalid opcode ",4096 before: []byte{OP_UNKNOWN187},4097 remove: []byte{1, 2, 3, 4},4098 after: []byte{OP_UNKNOWN187},4099 },4100 {4101 name: "invalid length (instruction)",4102 before: []byte{OP_PUSHDATA1},4103 remove: []byte{1, 2, 3, 4},4104 err: scriptError(ErrMalformedPush, ""),4105 },4106 {4107 name: "invalid length (data)",4108 before: []byte{OP_PUSHDATA1, 255, 254},4109 remove: []byte{1, 2, 3, 4},4110 err: scriptError(ErrMalformedPush, ""),4111 },4112 }4113 // tstRemoveOpcodeByData is a convenience function to parse the provided4114 // raw script, remove the passed data, then unparse the result back4115 // into a raw script.4116 tstRemoveOpcodeByData := func(script []byte, data []byte) ([]byte, error) {4117 pops, err := parseScript(script)4118 if err != nil {4119 return nil, err4120 }4121 pops = removeOpcodeByData(pops, data)4122 return unparseScript(pops)4123 }4124 for _, test := range tests {4125 result, err := tstRemoveOpcodeByData(test.before, test.remove)4126 if e := tstCheckScriptError(err, test.err); e != nil {4127 t.Errorf("%s: %v", test.name, e)4128 continue4129 }4130 if !bytes.Equal(test.after, result) {4131 t.Errorf("%s: value does not equal expected: exp: %q"+4132 " got: %q", test.name, test.after, result)4133 }4134 }4135}...

Full Screen

Full Screen

Bihua.php

Source:Bihua.php Github

copy

Full Screen

...5 */6namespace common\components\chinese;7class Bihua8{9 var $data;10 var $dataIndex;11 var $dataSpecial;12 var $tone;13 var $head;14 var $format;15 var $foot;16 public function setTone($tone)17 {18 $this->tone=$tone;19 }20 public function setFormat($head, $format, $foot)21 {22 $this->head=$head;23 $this->format=$format;24 $this->foot=$foot;25 }26 public function find($str, $isFirst=true)27 {28 for ($i=0;$i<36;$i++)29 {30 for ($j=0;$j<5;$j++)31 {32 //var_dump($i.','.$j);33 $index=isset($this->data[$i][$j])?strstr($this->data[$i][$j], $str):false;34 if (!($index===false)&&($index%2==0))35 return ($i+1);//($i+1).($isFirst?$this->dataIndex[$j]:"")36 }37 }38 return " ";39 }40 public function render($str, $ascii=false)41 {42 if ($ascii)43 return str_replace("%1", $str, str_replace("%2", $str, $this->format));44 $bihua=strstr($this->dataSpecial, $str." ")?$str:$this->find($str." ", $this->tone);45 return str_replace("%1", $str, str_replace("%2", $bihua, $this->format));46 }47 public function parse($str)48 {49 $output="";50 $length=strlen($str);51 $output.=$this->head;52 for ($i=0;$i<$length;++$i)53 {54 if ($i==$length-1)55 {56 $output.=$this->render($str[$i], true);57 break;58 }59 $code1=ord($str[$i]);60 $code2=ord($str[$i+1]);61 if ($code1==0x0D&&$code2==0x0A)62 {63 $output.=$this->foot;64 $output.=$this->head;65 ++$i;66 }67 else if ($code1>=0x81&&$code1<=0xFE&&$code2>=0x40&&$code2<=0xFE&&$code2!=0x7F)68 {69 $output.=$this->render($str[$i].$str[$i+1]);70 ++$i;71 }72 else73 $output.=$this->render($str[$i], true);74 }75 $output.=$this->foot;76 return $output;77 }78 public function __construct()79 {80 $this->tone=true;81 $this->head="";82 $this->format="";83 $this->foot="84%285%186";87 $this->dataIndex=array("一", "丨", "丿", "丶", "乛");88 $this->dataSpecial="! " # ¥ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | }  ̄ 、 。 · ˉ ˇ ¨ 〃 々 — ~ ‖ … ‘ ' “ ” 〔 〕 〈 〉 《 》 「 」 『 』 〖 〗 【 】 ± × ÷ ∶ ∧ ∨ ∑ ∏ ∪ ∩ ∈ ∷ √ ⊥ ∥ ∠ ⌒ ⊙ ∫ ∮ ≡ ≌ ≈ ∽ ∝ ≠ ≮ ≯ ≤ ≥ ∞ ∵ ∴ ♂ ♀ ° ′ ″ ℃ $ ¤ ¢ £ ‰ § № ☆ ★ ○ ● ◎ ◇ ◆ □ ■ △ ▲ ※ → ← ↑ ↓ 〓 〡 〢 〣 〤 〥 〦 〧 〨 〩 ㊣ ㎎ ㎏ ㎜ ㎝ ㎞ ㎡ ㏄ ㏎ ㏑ ㏒ ㏕ ︰ ¬ ¦ ℡ ㈱ ‐ ー ゛ ゜ ヽ ヾ 〆 ゝ ゞ ﹉ ﹊ ﹋ ﹌ ﹍ ﹎ ﹏ ﹐ ﹑ ﹒ ﹔ ﹕ ﹖ ﹗ ﹙ ﹚ ﹛ ﹜ ﹝ ﹞ ﹟ ﹠ ﹡ ﹢ ﹣ ﹤ ﹥ ﹦ ﹨ ﹩ ﹪ ﹫              〇 ─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ┌ ┍ ┎ ┏ ┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟ ┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯ ┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻ ┼ ┽ ┾ ┿ ╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ";89 $this->data[0][0]="一 ";90 $this->data[0][4]="乙 ";91 $this->data[1][0]="二 十 丁 厂 七 ";92 $this->data[1][1]="卜 ";93 $this->data[1][2]="八 人 入 乂 儿 九 匕 几 ";94 $this->data[1][4]="刁 了 乃 刀 力 又 乜 ";95 $this->data[2][0]="三 干 亍 于 亏 士 土 工 才 下 寸 丈 大 兀 与 万 弋 ";96 $this->data[2][1]="上 小 口 山 巾 ";97 $this->data[2][2]="千 乞 川 亿 彳 个 么 久 勺 丸 夕 凡 及 ";98 $this->data[2][3]="广 亡 门 丫 义 之 ";99 $this->data[2][4]="尸 已 巳 弓 己 卫 孑 子 孓 也 女 飞 刃 习 叉 马 乡 幺 ";100 $this->data[3][0]="丰 王 井 开 亓 夫 天 元 无 韦 云 专 丐 扎 廿 艺 木 五 支 厅 卅 不 仄 太 犬 区 历 友 歹 尤 匹 厄 车 巨 牙 屯 戈 比 互 切 瓦 ";101 $this->data[3][1]="止 少 曰 日 中 贝 内 水 冈 见 ";102 $this->data[3][2]="手 午 牛 毛 气 壬 升 夭 长 仁 仃 什 片 仆 仉 化 仇 币 仂 仍 仅 斤 爪 反 兮 刈 介 父 爻 从 仑 今 凶 分 乏 公 仓 月 氏 勿 风 欠 丹 匀 乌 勾 殳 凤 ";103 $this->data[3][3]="卞 六 文 亢 方 闩 火 为 斗 忆 计 订 户 讣 认 讥 冗 心 ";104 $this->data[3][4]="尹 尺 夬 引 丑 爿 巴 孔 队 办 以 允 邓 予 劝 双 书 毋 幻 ";105 $this->data[4][0]="玉 刊 末 未 示 击 邗 戋 打 巧 正 扑 卉 扒 邛 功 扔 去 甘 世 艾 艽 古 节 艿 本 术 札 可 叵 匝 丙 左 厉 丕 石 右 布 夯 龙 戊 平 灭 轧 东 匜 劢 ";106 $this->data[4][1]="卡 北 占 凸 卢 业 旧 帅 归 目 旦 且 叮 叶 甲 申 号 电 田 由 卟 叭 只 央 史 叱 叽 兄 叼 叩 叫 叻 叨 另 叹 冉 皿 凹 囚 四 ";107 $this->data[4][2]="生 失 矢 氕 乍 禾 仨 仕 丘 付 仗 代 仙 仟 仡 仫 伋 们 仪 白 仔 他 仞 斥 卮 瓜 乎 丛 令 用 甩 印 氐 乐 尔 句 匆 犰 册 卯 犯 外 处 冬 鸟 务 刍 包 饥 ";108 $this->data[4][3]="主 市 庀 邝 立 冯 邙 玄 闪 兰 半 汀 汁 汇 头 汈 汉 忉 宁 穴 宄 它 讦 讧 讨 写 让 礼 讪 讫 训 必 议 讯 记 永 ";109 $this->data[4][4]="司 尻 尼 民 弗 弘 阢 出 阡 辽 奶 奴 尕 加 召 皮 边 孕 发 圣 对 弁 台 矛 纠 驭 母 幼 丝 ";110 $this->data[5][0]="匡 耒 邦 玎 玑 式 迂 刑 邢 戎 动 圩 圬 圭 扛 寺 吉 扣 扦 圪 考 托 圳 老 圾 巩 执 扩 圹 扪 扫 圯 圮 地 扬 场 耳 芋 芏 共 芊 芍 芨 芄 芒 亚 芝 芎 芑 芗 朽 朴 机 权 过 亘 臣 吏 再 协 西 压 厌 厍 戌 在 百 有 存 而 页 匠 夸 夺 夼 灰 达 戍 尥 列 死 成 夹 夷 轨 邪 尧 划 迈 毕 至 ";111 $this->data[5][1]="此 乩 贞 师 尘 尖 劣 光 当 吁 早 吐 吓 旯 曳 虫 曲 团 同 吕 吊 吃 因 吸 吗 吆 屿 屹 岌 帆 岁 回 岂 屺 则 刚 网 肉 凼 囝 囡 ";112 $this->data[5][2]="钆 钇 年 朱 缶 氘 氖 牝 先 丢 廷 舌 竹 迁 乔 迄 伟 传 乒 乓 休 伍 伎 伏 伛 优 臼 伢 伐 仳 延 佤 仲 仵 件 任 伤 伥 价 伦 份 伧 华 仰 伉 仿 伙 伪 伫 自 伊 血 向 囟 似 后 行 甪 舟 全 会 杀 合 兆 企 汆 氽 众 爷 伞 创 刖 肌 肋 朵 杂 夙 危 旬 旭 旮 旨 负 犴 刎 犷 匈 犸 舛 各 名 多 凫 争 邬 色 饧 ";113 $this->data[5][3]="冱 壮 冲 妆 冰 庄 庆 亦 刘 齐 交 次 衣 产 决 亥 邡 充 妄 闭 问 闯 羊 并 关 米 灯 州 汗 污 江 汕 汔 汲 汐 汛 汜 池 汝 汤 汊 忖 忏 忙 兴 宇 守 宅 字 安 讲 讳 讴 军 讵 讶 祁 讷 许 讹 论 讼 农 讽 设 访 诀 ";114 $this->data[5][4]="聿 寻 那 艮 厾 迅 尽 导 异 弛 阱 阮 孙 阵 阳 收 阪 阶 阴 防 丞 奸 如 妁 妇 妃 好 她 妈 戏 羽 观 牟 欢 买 纡 红 纣 驮 纤 纥 驯 纨 约 级 纩 纪 驰 纫 巡 ";115 $this->data[6][0]="寿 玕 弄 玙 麦 玖 玚 玛 形 进 戒 吞 远 违 韧 运 扶 抚 坛 抟 技 坏 抔 抠 坜 扰 扼 拒 找 批 扯 址 走 抄 汞 坝 贡 攻 赤 圻 折 抓 扳 坂 抡 扮 抢 扺 孝 坎 坍 均 坞 抑 抛 投 抃 坟 坑 抗 坊 抖 护 壳 志 扭 块 抉 声 把 报 拟 抒 却 劫 毐 芙 芫 芜 苇 邯 芸 芾 芰 苈 苊 苣 芽 芷 芮 苋 芼 苌 花 芹 芥 苁 芩 芬 苍 芪 芴 芡 芟 苄 芳 严 苎 芦 芯 劳 克 芭 苏 苡 杆 杜 杠 材 村 杖 杌 杏 杉 巫 杓 极 杧 杞 李 杨 杈 求 忑 孛 甫 匣 更 束 吾 豆 两 邴 酉 丽 医 辰 励 邳 否 还 矶 奁 豕 尬 歼 来 忒 连 欤 轩 轪 轫 迓 ";116 $this->data[6][1]="邶 忐 芈 步 卤 卣 邺 坚 肖 旰 旱 盯 呈 时 吴 呋 助 县 里 呓 呆 吱 吠 呔 呕 园 呖 呃 旷 围 呀 吨 旸 吡 町 足 虬 邮 男 困 吵 串 呙 呐 呗 员 听 吟 吩 呛 吻 吹 呜 吭 吣 吲 吼 邑 吧 囤 别 吮 岍 帏 岐 岖 岈 岗 岘 帐 岑 岚 兕 财 囵 囫 ";117 $this->data[6][2]="钉 针 钊 钋 钌 迕 氙 氚 牡 告 我 乱 利 秃 秀 私 岙 每 佞 兵 邱 估 体 何 佐 伾 佑 攸 但 伸 佃 佚 作 伯 伶 佣 低 你 佝 佟 住 位 伴 佗 身 皂 伺 佛 伽 囱 近 彻 役 彷 返 佘 余 希 佥 坐 谷 孚 妥 豸 含 邻 坌 岔 肝 肟 肛 肚 肘 肠 邸 龟 甸 奂 免 劬 狂 犹 狈 狄 角 删 狃 狁 鸠 条 彤 卵 灸 岛 邹 刨 饨 迎 饩 饪 饫 饬 饭 饮 系 ";118 $this->data[6][3]="言 冻 状 亩 况 亨 庑 床 庋 库 庇 疔 疖 疗 吝 应 冷 这 庐 序 辛 肓 弃 冶 忘 闰 闱 闲 闳 间 闵 闶 闷 羌 判 兑 灶 灿 灼 炀 弟 沣 汪 沅 沄 沐 沛 沔 汰 沤 沥 沌 沘 沏 沚 沙 汩 汨 汭 汽 沃 沂 沦 汹 汾 泛 沧 沨 沟 没 汴 汶 沆 沩 沪 沈 沉 沁 泐 怃 忮 怀 怄 忧 忡 忤 忾 怅 忻 忪 怆 忭 忱 快 忸 完 宋 宏 牢 究 穷 灾 良 证 诂 诃 启 评 补 初 社 祀 祃 诅 识 诈 诉 罕 诊 诋 诌 词 诎 诏 诐 译 诒 ";119 $this->data[6][4]="君 灵 即 层 屁 屃 尿 尾 迟 局 改 张 忌 际 陆 阿 孜 陇 陈 阽 阻 阼 附 坠 陀 陂 陉 妍 妩 妓 妪 妣 妙 妊 妖 妗 姊 妨 妫 妒 妞 姒 妤 努 邵 劭 忍 刭 劲 甬 邰 矣 鸡 纬 纭 驱 纯 纰 纱 纲 纳 纴 纵 驳 纶 纷 纸 纹 纺 纻 驴 纽 纾 ";120 $this->data[7][0]="奉 玩 玮 环 玡 武 青 责 现 玫 玠 玢 玥 表 玦 甙 盂 忝 规 匦 抹 卦 邽 坩 坷 坯 拓 垅 拢 拔 抨 坪 拣 拤 拈 坫 垆 坦 担 坤 押 抻 抽 拐 拃 拖 拊 者 拍 顶 坼 拆 拎 拥 抵 坻 拘 势 抱 拄 垃 拉 拦 幸 拌 拧 坨 坭 抿 拂 拙 招 坡 披 拨 择 拚 抬 拇 坳 拗 耵 其 耶 取 茉 苷 苦 苯 昔 苛 苤 若 茂 茏 苹 苫 苴 苜 苗 英 苒 苘 茌 苻 苓 茚 苟 茆 茑 苑 苞 范 茓 茔 茕 直 苠 茀 茁 茄 苕 茎 苔 茅 枉 林 枝 杯 枢 枥 柜 枇 杪 杳 枘 枧 杵 枚 枨 析 板 枞 松 枪 枫 构 杭 枋 杰 述 枕 杻 杷 杼 丧 或 画 卧 事 刺 枣 雨 卖 矸 郁 矻 矾 矽 矿 砀 码 厕 奈 刳 奔 奇 奄 奋 态 瓯 欧 殴 垄 殁 郏 妻 轰 顷 转 轭 斩 轮 软 到 郅 鸢 ";121 $this->data[7][1]="非 叔 歧 肯 齿 些 卓 虎 虏 肾 贤 尚 盱 旺 具 昊 昙 果 味 杲 昃 昆 国 哎 咕 昌 呵 咂 畅 呸 昕 明 易 咙 昀 昂 旻 昉 炅 咔 畀 虮 迪 典 固 忠 咀 呷 呻 黾 咒 咋 咐 呱 呼 呤 咚 鸣 咆 咛 咏 呢 咄 呶 咖 呦 咝 岵 岢 岸 岩 帖 罗 岿 岬 岫 帜 帙 帕 岭 岣 峁 刿 峂 迥 岷 剀 凯 帔 峄 沓 败 账 贩 贬 购 贮 囹 图 罔 ";122 $this->data[7][2]="钍 钎 钏 钐 钓 钒 钔 钕 钗 邾 制 知 迭 氛 迮 垂 牦 牧 物 乖 刮 秆 和 季 委 竺 秉 迤 佳 侍 佶 岳 佬 佴 供 使 侑 佰 侉 例 侠 臾 侥 版 侄 岱 侦 侣 侗 侃 侧 侏 凭 侨 侩 佻 佾 佩 货 侈 侪 佼 依 佯 侬 帛 卑 的 迫 阜 侔 质 欣 郈 征 徂 往 爬 彼 径 所 舍 金 刽 郐 刹 命 肴 郄 斧 怂 爸 采 籴 觅 受 乳 贪 念 贫 忿 瓮 戗 肼 肤 朊 肺 肢 肽 肱 肫 肿 肭 胀 朋 肷 股 肮 肪 肥 服 胁 周 剁 昏 迩 郇 鱼 兔 狉 狙 狎 狐 忽 狝 狗 狍 狞 狒 咎 备 炙 枭 饯 饰 饱 饲 饳 饴 ";123 $this->data[7][3]="冽 变 京 享 冼 庞 店 夜 庙 府 底 庖 疟 疠 疝 疙 疚 疡 剂 卒 郊 兖 庚 废 净 妾 盲 放 於 刻 劾 育 氓 闸 闹 郑 券 卷 单 炜 炬 炖 炒 炝 炊 炕 炎 炉 炔 沫 浅 法 泔 泄 沽 沭 河 泷 沾 泸 沮 泪 油 泱 泅 泗 泊 泠 泜 泺 泃 沿 泖 泡 注 泣 泫 泮 泞 沱 泻 泌 泳 泥 泯 沸 泓 沼 波 泼 泽 泾 治 怔 怯 怙 怵 怖 怦 怛 怏 性 怍 怕 怜 怩 怫 怊 怿 怪 怡 学 宝 宗 定 宕 宠 宜 审 宙 官 空 帘 穸 穹 宛 实 宓 诓 诔 试 郎 诖 诗 诘 戾 肩 房 诙 戽 诚 郓 衬 衫 衩 祆 祎 祉 视 祈 诛 诜 话 诞 诟 诠 诡 询 诣 诤 该 详 诧 诨 诩 ";124 $this->data[7][4]="建 肃 隶 录 帚 屉 居 届 刷 鸤 屈 弧 弥 弦 承 孟 陋 戕 陌 孤 孢 陕 亟 降 函 陔 限 卺 妹 姑 姐 妲 妯 姓 姗 妮 始 帑 弩 孥 驽 姆 虱 迦 迢 驾 叁 参 迨 艰 线 绀 绁 绂 练 驵 组 绅 细 驶 织 驷 驸 驹 终 绉 驺 驻 绊 驼 绋 绌 绍 驿 绎 经 骀 贯 甾 ";125 $this->data[8][0]="砉 耔 契 贰 奏 春 帮 珏 珐 珂 珑 玷 玳 珀 顸 珍 玲 珊 珉 珈 玻 毒 型 韨 拭 挂 封 持 拮 拷 拱 垭 挝 垣 项 垮 挎 垯 挞 城 挟 挠 垤 政 赴 赵 赳 贲 垱 挡 拽 垌 哉 垲 挺 括 挢 埏 郝 垍 垧 垢 拴 拾 挑 垛 指 垫 挣 挤 垓 垟 拼 垞 挖 按 挥 挦 挪 垠 拯 拶 某 甚 荆 茸 革 茜 茬 荐 荙 巷 荚 荑 贳 荛 荜 茈 带 草 茧 茼 莒 茵 茴 茱 莛 荞 茯 荏 荇 荃 荟 茶 荀 茗 荠 茭 茨 荒 垩 茳 茫 荡 荣 荤 荥 荦 荧 荨 茛 故 荩 胡 荪 荫 茹 荔 南 荬 荭 药 柰 标 栈 柑 枯 栉 柯 柄 柘 栊 柩 枰 栋 栌 相 查 柙 枵 柚 枳 柞 柏 柝 栀 柃 柢 栎 枸 栅 柳 柱 柿 栏 柈 柠 柁 枷 柽 树 勃 剌 郚 剅 要 酊 郦 柬 咸 威 歪 甭 研 砖 厘 砗 厚 砑 砘 砒 砌 砂 泵 砚 斫 砭 砜 砍 面 耐 耍 奎 耷 牵 鸥 虺 残 殂 殃 殇 殄 殆 轱 轲 轳 轴 轵 轶 轷 轸 轹 轺 轻 鸦 虿 皆 毖 ";126 $this->data[8][1]="韭 背 战 觇 点 虐 临 览 竖 尜 省 削 尝 哐 昧 眄 眍 盹 是 郢 眇 眊 盼 眨 昽 眈 哇 咭 哄 哑 显 冒 映 禺 哂 星 昨 咴 曷 昴 咧 昱 昵 咦 哓 昭 哔 畎 畏 毗 趴 呲 胄 胃 贵 畋 畈 界 虹 虾 虼 虻 蚁 思 蚂 盅 咣 虽 品 咽 骂 哕 剐 郧 勋 咻 哗 囿 咱 咿 响 哌 哙 哈 哚 咯 哆 咬 咳 咩 咪 咤 哝 哪 哏 哞 哟 峙 炭 峡 峣 罘 帧 罚 峒 峤 峋 峥 峧 帡 贱 贴 贶 贻 骨 幽 ";127 $this->data[8][2]="钘 钙 钚 钛 钝 钞 钟 钡 钠 钢 钣 钤 钥 钦 钧 钨 钩 钪 钫 钬 钭 钮 钯 卸 缸 拜 看 矩 矧 毡 氡 氟 氢 牯 怎 郜 牲 选 适 秕 秒 香 种 秭 秋 科 重 复 竽 竿 笈 笃 俦 段 俨 俅 便 俩 俪 叟 垡 贷 牮 顺 修 俏 俣 俚 保 俜 促 俄 俐 侮 俭 俗 俘 信 皇 泉 皈 鬼 侵 禹 侯 追 俑 俟 俊 盾 逅 待 徊 徇 徉 衍 律 很 须 舢 舣 叙 俞 弇 郗 剑 逃 俎 卻 爰 郛 食 瓴 盆 胚 胧 胨 胩 胪 胆 胛 胂 胜 胙 胍 胗 胝 朐 胞 胖 脉 胫 胎 鸨 匍 勉 狨 狭 狮 独 狯 狰 狡 飐 飑 狩 狱 狠 狲 訇 訄 逄 昝 贸 怨 急 饵 饶 蚀 饷 饸 饹 饺 饻 胤 饼 ";128 $this->data[8][3]="峦 弯 孪 娈 将 奖 哀 亭 亮 庤 度 弈 奕 迹 庭 庥 疬 疣 疥 疭 疮 疯 疫 疢 疤 庠 咨 姿 亲 竑 音 彦 飒 帝 施 闺 闻 闼 闽 闾 闿 阀 阁 阂 差 养 美 羑 姜 迸 叛 送 类 籼 迷 籽 娄 前 酋 首 逆 兹 总 炳 炻 炼 炟 炽 炯 炸 烀 烁 炮 炷 炫 烂 烃 剃 洼 洁 洱 洪 洹 洒 洧 洌 浃 柒 浇 泚 浈 浉 浊 洞 洇 洄 测 洙 洗 活 洑 涎 洎 洫 派 浍 洽 洮 染 洵 洚 洺 洛 浏 济 洨 浐 洋 洴 洣 洲 浑 浒 浓 津 浔 浕 洳 恸 恃 恒 恹 恢 恍 恫 恺 恻 恬 恤 恰 恂 恪 恼 恽 恨 举 觉 宣 宦 宥 宬 室 宫 宪 突 穿 窀 窃 客 诫 冠 诬 语 扁 扃 袆 衲 衽 袄 衿 袂 祛 祜 祓 祖 神 祝 祚 诮 祗 祢 祠 误 诰 诱 诲 诳 鸩 说 昶 诵 ";129 $this->data[8][4]="郡 垦 退 既 屋 昼 咫 屏 屎 弭 费 陡 逊 牁 眉 胥 孩 陛 陟 陧 陨 除 险 院 娃 姞 姥 娅 姨 娆 姻 姝 娇 姚 姽 姣 姘 姹 娜 怒 架 贺 盈 怼 羿 勇 炱 怠 癸 蚤 柔 矜 垒 绑 绒 结 绔 骁 绕 骄 骅 绗 绘 给 绚 彖 绛 络 骆 绝 绞 骇 统 骈 ";130 $this->data[9][0]="耕 耘 耖 耗 耙 艳 挈 恝 泰 秦 珥 珙 顼 珰 珠 珽 珩 珧 珣 珞 琤 班 珲 敖 素 匿 蚕 顽 盏 匪 恚 捞 栽 捕 埔 埂 捂 振 载 赶 起 盐 捎 捍 埕 捏 埘 埋 捉 捆 捐 埚 埙 损 袁 挹 捌 都 哲 逝 耆 耄 捡 挫 捋 埒 换 挽 贽 挚 热 恐 捣 垸 壶 捃 捅 盍 埃 挨 耻 耿 耽 聂 莰 茝 荸 莆 恭 莽 莱 莲 莳 莫 莴 莪 莉 莠 莓 荷 莜 莅 荼 莶 莩 荽 获 莸 荻 莘 晋 恶 莎 莞 莹 莨 莺 真 莙 鸪 莼 框 梆 桂 桔 栲 栳 郴 桓 栖 桡 桎 桢 桄 档 桐 桤 株 梃 栝 桥 桕 桦 桁 栓 桧 桃 桅 栒 格 桩 校 核 样 栟 桉 根 栩 逑 索 逋 彧 哥 速 鬲 豇 逗 栗 贾 酐 酎 酌 配 酏 逦 翅 辱 唇 厝 孬 夏 砝 砹 砸 砺 砰 砧 砷 砟 砼 砥 砾 砣 础 破 硁 恧 原 套 剞 逐 砻 烈 殊 殉 顾 轼 轾 轿 辀 辁 辂 较 鸫 顿 趸 毙 致 ";131 $this->data[9][1]="剕 龀 柴 桌 鸬 虔 虑 监 紧 逍 党 眬 唛 逞 晒 晟 眩 眠 晓 眙 唝 哧 哳 哮 唠 鸭 晃 哺 哽 唔 晔 晌 晁 剔 晏 晖 晕 鸮 趵 趿 畛 蚌 蚨 蚜 蚍 蚋 蚬 畔 蚝 蚧 蚣 蚊 蚪 蚓 哨 唢 哩 圃 哭 圄 哦 唣 唏 恩 盎 唑 鸯 唤 唁 哼 唧 啊 唉 唆 帱 崂 崃 罡 罢 罟 峭 峨 峪 峰 圆 觊 峻 贼 贿 赂 赃 赅 赆 ";132 $this->data[9][2]="钰 钱 钲 钳 钴 钵 钷 钹 钺 钻 钼 钽 钾 钿 铀 铁 铂 铃 铄 铅 铆 铈 铉 铊 铋 铌 铍 铎 眚 缺 氩 氤 氦 氧 氨 毪 特 牺 造 乘 敌 舐 秣 秫 秤 租 秧 积 盉 秩 称 秘 透 笄 笕 笔 笑 笊 笫 笏 笋 笆 俸 倩 债 俵 倻 借 偌 值 倚 俺 倾 倒 俳 俶 倬 倏 倘 俱 倡 候 赁 恁 倭 倪 俾 倜 隼 隽 倞 俯 倍 倦 倓 倌 倥 臬 健 臭 射 皋 躬 息 郫 倨 倔 衄 颀 徒 徕 徐 殷 舰 舨 舱 般 航 舫 瓞 途 拿 釜 耸 爹 舀 爱 豺 豹 奚 鬯 衾 鸰 颁 颂 翁 胯 胰 胱 胴 胭 脍 脎 脆 脂 胸 胳 脏 脐 胶 脑 胲 胼 朕 脒 胺 脓 鸱 玺 鱽 鸲 逛 狴 狸 狷 猁 狳 猃 狺 逖 狼 卿 狻 逢 桀 鸵 留 袅 眢 鸳 皱 饽 饿 馀 馁 ";133 $this->data[9][3]="凌 凇 凄 栾 挛 恋 桨 浆 衰 勍 衷 高 亳 郭 席 准 座 脊 症 疳 疴 病 疽 疸 疾 痄 斋 疹 痈 疼 疱 疰 痃 痂 疲 痉 脊 效 离 衮 紊 唐 凋 颃 瓷 资 恣 凉 站 剖 竞 部 旁 旆 旄 旅 旃 畜 阃 阄 阅 阆 羞 羔 恙 瓶 桊 拳 敉 粉 料 粑 益 兼 朔 郸 烤 烘 烜 烦 烧 烛 烟 烨 烩 烙 烊 剡 郯 烬 递 涛 浙 涝 浡 浦 涑 浯 酒 涞 涟 涉 娑 消 涅 涠 浞 涓 涢 涡 浥 涔 浩 海 浜 涂 浠 浴 浮 涣 浼 涤 流 润 涧 涕 浣 浪 浸 涨 烫 涩 涌 涘 浚 悖 悚 悟 悭 悄 悍 悝 悃 悒 悔 悯 悦 悌 悢 悛 害 宽 宸 家 宵 宴 宾 窍 窅 窄 容 窈 剜 宰 案 请 朗 诸 诹 诺 读 扅 诼 冢 扇 诽 袜 袪 袒 袖 袗 袍 袢 被 袯 祯 祧 祥 课 冥 诿 谀 谁 谂 调 冤 谄 谅 谆 谇 谈 谊 ";134 $this->data[9][4]="剥 恳 展 剧 屑 屐 屙 弱 陵 陬 勐 奘 疍 牂 蚩 祟 陲 陴 陶 陷 陪 烝 姬 娠 娱 娌 娉 娟 娲 恕 娥 娩 娴 娣 娘 娓 婀 砮 哿 畚 通 能 难 逡 预 桑 剟 绠 骊 绡 骋 绢 绣 验 绤 绥 绦 骍 继 绨 骎 骏 邕 烝 鸶 ";135 $this->data[10][0]="彗 耜 焘 舂 琎 球 琏 琐 理 琇 麸 琉 琅 捧 掭 堵 揶 措 描 埴 域 捺 掎 埼 掩 埯 捷 捯 排 焉 掉 掳 掴 埸 堌 捶 赦 赧 推 堆 捭 埠 晳 掀 逵 授 捻 埝 堋 教 堍 掏 掐 掬 鸷 掠 掂 掖 培 掊 接 堉 掷 掸 控 捩 掮 探 悫 埭 埽 据 掘 掺 掇 掼 职 聃 基 聆 勘 聊 聍 娶 菁 菝 著 菱 萁 菥 菘 堇 勒 黄 萘 萋 勩 菲 菽 菖 萌 萜 萝 菌 萎 萸 萑 菂 菜 棻 菔 菟 萄 萏 菊 萃 菩 菼 菏 萍 菹 菠 菪 菅 菀 萤 营 萦 乾 萧 菰 菡 萨 菇 械 梽 彬 梵 梦 婪 梗 梧 梾 梢 梏 梅 觋 检 桴 桷 梓 梳 棁 梯 桫 棂 桶 梭 救 啬 郾 匮 曹 敕 副 豉 票 鄄 酝 酞 酗 酚 厢 厣 戚 戛 硎 硅 硭 硒 硕 硖 硗 硐 硚 硇 硌 鸸 瓠 匏 奢 盔 爽 厩 聋 龚 袭 殒 殓 殍 盛 赉 匾 雩 雪 辄 辅 辆 堑 ";136 $this->data[10][1]="龁 颅 虚 彪 雀 堂 常 眶 眭 唪 眦 啧 匙 晡 晤 晨 眺 眵 睁 眯 眼 眸 悬 野 圊 啪 啦 喏 喵 啉 勖 曼 晦 晞 晗 晚 冕 啄 啭 啡 畦 趼 趺 距 趾 啃 跃 啮 跄 略 蚶 蛄 蛎 蛆 蚰 蚺 蛊 圉 蚱 蚯 蛉 蛀 蛇 蛏 蚴 唬 累 鄂 唱 患 啰 唾 唯 啤 啥 啁 啕 唿 啐 唼 唷 啴 啖 啵 啶 啷 唳 啸 啜 帻 崖 崎 崦 崭 逻 帼 崮 崔 帷 崟 崤 崩 崞 崇 崆 崛 赇 赈 婴 赊 圈 ";137 $this->data[10][2]="铐 铑 铒 铕 铗 铘 铙 銍 铛 铜 铝 铞 铟 铠 铡 铢 铣 铤 铥 铧 铨 铩 铪 铫 铭 铬 铮 铯 铰 铱 铲 铳 铴 铵 银 铷 矫 氪 牾 甜 鸹 秸 梨 犁 稆 秽 移 秾 逶 笺 筇 笨 笸 笼 笪 笛 笙 笮 符 笱 笠 笥 第 笳 笤 笾 笞 敏 偾 做 鸺 偃 偕 袋 悠 偿 偶 偈 偎 偲 傀 偷 您 偬 售 停 偻 偏 躯 皑 兜 皎 假 衅 鸻 徘 徙 徜 得 衔 舸 舻 舳 盘 舴 舶 船 鸼 舷 舵 斜 龛 盒 鸽 瓻 敛 悉 欲 彩 领 翎 脚 脖 脯 豚 脶 脸 脞 脬 脱 脘 脲 脧 匐 鱾 象 够 逸 猜 猪 猎 猫 猗 凰 猖 猡 猊 猞 猄 猝 斛 觖 猕 猛 馗 祭 馃 馄 馅 馆 ";138 $this->data[10][3]="凑 减 鸾 毫 孰 烹 庶 庹 麻 庵 庼 庾 庳 痔 痍 疵 痊 痒 痕 廊 康 庸 鹿 盗 章 竟 翊 商 旌 族 旎 旋 望 袤 率 阇 阈 阉 阊 阋 阌 阍 阎 阏 阐 着 羚 羝 羟 盖 眷 粝 粘 粗 粕 粒 断 剪 兽 焐 焊 烯 焓 焕 烽 焖 烷 烺 焌 清 渍 添 渚 鸿 淇 淋 淅 淞 渎 涯 淹 涿 渠 渐 淑 淖 挲 淌 淏 混 淠 涸 渑 淮 淦 淆 渊 淫 淝 渔 淘 淳 液 淬 涪 淤 淡 淙 淀 涫 深 渌 涮 涵 婆 梁 渗 淄 情 惬 悻 惜 惭 悱 悼 惝 惧 惕 惘 悸 惟 惆 惚 惊 惇 惦 悴 惮 惋 惨 惯 寇 寅 寄 寂 逭 宿 窒 窑 窕 密 谋 谌 谍 谎 谏 扈 皲 谐 谑 裆 袱 袼 裈 裉 祷 祸 祲 谒 谓 谔 谕 谖 谗 谙 谚 谛 谜 谝 敝 ";139 $this->data[10][4]="逮 逯 敢 尉 屠 艴 弹 隋 堕 郿 随 蛋 隅 隈 粜 隍 隗 隆 隐 婧 婊 婞 婳 婕 娼 婢 婚 婵 婶 婉 胬 袈 颇 颈 翌 恿 欸 绩 绪 绫 骐 续 骑 绮 绯 绰 骒 绲 绳 骓 维 绵 绶 绷 绸 绹 绺 绻 综 绽 绾 绿 骖 缀 缁 巢 ";140 $this->data[11][0]="耠 琫 琵 琴 琶 琪 瑛 琳 琦 琢 琥 琨 靓 琼 斑 琰 琮 琯 琬 琛 琚 辇 替 鼋 揳 揍 款 堪 堞 搽 塔 搭 塃 揸 堰 揠 堙 揩 越 趄 趁 趋 超 揽 提 堤 揖 博 揾 颉 揭 喜 彭 揣 塄 揿 插 揪 搜 煮 堠 耋 揄 援 搀 蛰 蛩 絷 塆 裁 揞 搁 搓 搂 搅 揎 壹 握 摒 揆 搔 揉 掾 葜 聒 斯 期 欺 联 葑 葚 葫 靰 靸 散 葳 惹 蒇 葬 蒈 募 葺 葛 蒉 葸 萼 蓇 萩 董 葆 葩 葡 敬 葱 蒋 葶 蒂 蒌 篊 蒎 落 萱 葖 韩 戟 朝 葭 辜 葵 棒 楮 棱 棋 椰 植 森 棼 焚 椟 椅 椒 棹 棵 棍 椤 棰 椎 棉 椑 鹀 赍 棚 椋 椁 棬 棕 棺 榔 楗 棣 椐 椭 鹁 惠 惑 逼 覃 粟 棘 酣 酤 酢 酥 酡 酦 鹂 觌 厨 厦 硬 硝 硪 硷 确 硫 雁 厥 殖 裂 雄 殚 殛 颊 雳 雯 辊 辋 椠 暂 辌 辍 辎 雅 翘 ";141 $this->data[11][1]="辈 斐 悲 紫 凿 黹 辉 敞 棠 牚 赏 掌 晴 睐 暑 最 晰 量 睑 睇 鼎 睃 喷 戢 喋 嗒 喃 喳 晶 喇 遇 喊 喱 喹 遏 晷 晾 景 喈 畴 践 跖 跋 跌 跗 跞 跚 跑 跎 跏 跛 跆 遗 蛙 蛱 蛲 蛭 蛳 蛐 蛔 蛛 蜓 蛞 蜒 蛤 蛴 蛟 蛘 蛑 畯 喁 喝 鹃 喂 喟 斝 喘 啾 嗖 喤 喉 喻 喑 啼 嗟 喽 嗞 喧 喀 喔 喙 嵌 嵘 嵖 幅 崴 遄 詈 帽 嵎 崽 嵚 嵬 嵛 翙 嵯 嵝 嵫 幄 嵋 赋 赌 赎 赐 赑 赔 黑 ";142 $this->data[11][2]="铸 铹 铺 铻 铼 铽 链 铿 销 锁 锃 锄 锂 锅 锆 锇 锈 锉 锊 锋 锌 锎 锏 锐 锑 锒 锓 锔 锕 甥 掣 掰 短 智 矬 氰 毳 毯 氮 毽 氯 犊 犄 犋 鹄 犍 鹅 颋 剩 嵇 稍 程 稀 黍 稃 税 稂 筐 等 筘 筑 策 筚 筛 筜 筒 筅 筏 筵 筌 答 筋 筝 傣 傲 傅 傈 舄 牍 牌 傥 堡 集 焦 傍 傧 储 遑 皓 皖 粤 奥 傩 遁 街 惩 御 徨 循 舾 艇 舒 畲 弑 逾 颌 翕 釉 番 释 鹆 禽 舜 貂 腈 腊 腌 腓 腆 腴 脾 腋 腑 腙 腚 腔 腕 腱 腒 鱿 鲀 鲁 鲂 鲃 颍 猢 猹 猩 猥 猬 猾 猴 飓 觞 觚 猸 猱 惫 飧 然 馇 馈 馉 馊 馋 ";143 $this->data[11][3]="亵 装 蛮 脔 就 敦 裒 廋 斌 痣 痨 痦 痘 痞 痢 痤 痪 痫 痧 痛 鄌 赓 竦 童 瓿 竣 啻 颏 鹇 阑 阒 阔 阕 善 翔 羡 普 粪 粞 尊 奠 遒 道 遂 孳 曾 焯 焜 焰 焙 焱 鹈 湛 港 渫 滞 湖 湘 渣 渤 湮 湎 湝 湨 湜 渺 湿 温 渴 渭 溃 湍 溅 滑 湃 湫 溲 湟 溆 渝 湲 湾 渡 游 溠 溇 湔 滋 湉 渲 溉 渥 湄 滁 愤 慌 惰 愠 惺 愦 愕 惴 愣 愀 愎 惶 愧 愉 愔 慨 喾 割 寒 富 寓 窜 窝 窖 窗 窘 寐 谟 扉 遍 棨 雇 扊 裢 裎 裣 裕 裤 裥 裙 祾 祺 祼 谠 禅 禄 幂 谡 谢 谣 谤 谥 谦 谧 ";144 $this->data[11][4]="堲 遐 犀 属 屡 孱 弼 强 粥 巽 疏 隔 骘 隙 隘 媒 媪 絮 嫂 媛 婷 媚 婿 巯 毵 翚 登 皴 婺 骛 缂 缃 缄 缅 彘 缆 缇 缈 缉 缌 缎 缏 缑 缒 缓 缔 缕 骗 编 缗 骙 骚 缘 飨 ";145 $this->data[12][0]="耢 瑟 瑚 鹉 瑁 瑞 瑰 瑀 瑜 瑗 瑄 瑕 遨 骜 瑙 遘 韫 魂 髡 肆 摄 摸 填 搏 塥 塬 鄢 趔 趑 摅 塌 摁 鼓 摆 赪 携 塮 蜇 搋 搬 摇 搞 搪 塘 搒 搐 搛 搠 摈 彀 毂 搌 搦 摊 搡 聘 蓁 戡 斟 蒜 蓍 鄞 勤 靴 靳 靶 鹊 蓐 蓝 墓 幕 蓦 鹋 蒽 蓓 蓖 蓊 蒯 蓟 蓬 蓑 蒿 蒺 蓠 蒟 蒡 蓄 蒹 蒴 蒲 蒗 蓉 蒙 蓂 蓥 颐 蒸 献 蓣 楔 椿 楠 禁 楂 楚 楝 楷 榄 想 楫 榀 楞 楸 椴 槐 槌 楯 榆 榇 榈 槎 楼 榉 楦 概 楣 楹 椽 裘 赖 剽 甄 酮 酰 酯 酪 酩 酬 蜃 感 碛 碍 碘 碓 碑 硼 碉 碎 碚 碰 碇 碗 碌 碜 鹌 尴 雷 零 雾 雹 辏 辐 辑 辒 输 ";146 $this->data[12][1]="督 频 龃 龄 龅 龆 觜 訾 粲 虞 鉴 睛 睹 睦 瞄 睚 嗪 睫 韪 嗷 嗉 睡 睨 睢 雎 睥 睬 嘟 嗜 嗑 嗫 嗬 嗔 鄙 嗦 嗝 愚 戥 嗄 暖 盟 煦 歇 暗 暅 暄 暇 照 遢 暌 畸 跬 跨 跶 跷 跸 跐 跣 跹 跳 跺 跪 路 跻 跤 跟 遣 蛸 蜈 蜎 蜗 蛾 蜊 蜍 蜉 蜂 蜣 蜕 畹 蛹 嗣 嗯 嗅 嗥 嗲 嗳 嗡 嗌 嗍 嗨 嗤 嗵 嗓 署 置 罨 罪 罩 蜀 幌 嵊 嵩 嵴 骰 ";147 $this->data[12][2]="锖 锗 错 锘 锚 锛 锜 锝 锞 锟 锡 锢 锣 锤 锥 锦 锧 锨 锪 锫 锩 锬 锭 键 锯 锰 锱 矮 雉 氲 犏 辞 歃 稞 稚 稗 稔 稠 颓 愁 筹 筠 筢 筮 筻 筲 筼 筱 签 简 筷 毁 舅 鼠 牒 煲 催 傻 像 躲 鹎 魁 敫 僇 衙 微 徭 愆 艄 觎 毹 愈 遥 貊 貅 貉 颔 腻 腠 腩 腰 腼 腽 腥 腮 腭 腹 腺 腧 鹏 塍 媵 腾 腿 詹 鲅 鲆 鲇 鲈 鲉 鲊 稣 鲋 鲌 鲍 鲏 鲐 肄 猿 颖 鹐 飔 飕 觥 触 解 遛 煞 雏 馌 馍 馏 馐 ";148 $this->data[12][3]="酱 鹑 禀 亶 廒 瘃 痱 痹 痼 廓 痴 痿 瘐 瘁 瘅 痰 瘆 廉 鄘 麂 裔 靖 新 鄣 歆 韵 意 旒 雍 阖 阗 阘 阙 羧 豢 誊 粳 粮 数 煎 猷 塑 慈 煤 煳 煜 煨 煅 煌 煊 煸 煺 滟 溱 溘 滠 满 漭 漠 滢 滇 溥 溧 溽 源 滤 滥 裟 溻 溷 溦 滗 滫 溴 滏 滔 溪 滃 溜 滦 漓 滚 溏 滂 溢 溯 滨 溶 滓 溟 滘 溺 滍 粱 滩 滪 愫 慑 慎 慥 慊 誉 鲎 塞 骞 寞 窥 窦 窠 窣 窟 寝 谨 裱 褂 褚 裸 裼 裨 裾 裰 禊 福 谩 谪 谫 谬 ";149 $this->data[12][4]="群 殿 辟 障 媾 嫫 媳 媲 嫒 嫉 嫌 嫁 嫔 媸 叠 缙 缜 缚 缛 辔 缝 骝 缟 缠 缡 缢 缣 缤 骟 剿 ";150 $this->data[13][0]="耥 璈 静 碧 瑶 璃 瑭 瑢 獒 赘 熬 觏 慝 嫠 韬 髦 墈 墙 摽 墟 撇 墁 撂 摞 嘉 摧 撄 赫 截 翥 踅 誓 銎 摭 墉 境 摘 墒 摔 穀 撖 摺 綦 聚 蔫 蔷 靺 靼 鞅 靽 鞁 靿 蔌 蔽 慕 暮 摹 蔓 蔑 甍 蔸 蓰 蔹 蔡 蔗 蔟 蔺 戬 蔽 蕖 蔻 蓿 蔼 斡 熙 蔚 鹕 兢 嘏 蓼 榛 榧 模 槚 槛 榻 榫 槜 榭 槔 榴 槁 榜 槟 榨 榕 槠 榷 榍 歌 遭 僰 酵 酽 酾 酲 酷 酶 酴 酹 酿 酸 厮 碶 碡 碟 碴 碱 碣 碳 碲 磋 磁 碹 碥 愿 劂 臧 豨 殡 需 霆 霁 辕 辖 辗 ";151 $this->data[13][1]="蜚 裴 翡 雌 龇 龈 睿 弊 裳 颗 夥 瞅 瞍 睽 墅 嘞 嘈 嗽 嘌 嘁 嘎 暧 暝 踌 踉 跽 踊 蜻 蜞 蜡 蜥 蜮 蜾 蝈 蜴 蝇 蜘 蜱 蜩 蜷 蝉 蜿 螂 蜢 嘘 嘡 鹗 嘣 嘤 嘚 嘛 嘀 嗾 嘧 罴 罱 幔 嶂 幛 赙 罂 赚 骷 骶 鹘 ";152 $this->data[13][2]="锲 锴 锶 锷 锸 锹 锻 鍠 锾 锵 锿 镀 镁 镂 镃 镄 镅 舞 犒 舔 稳 熏 箐 箦 箧 箍 箸 箨 箕 箬 算 箅 箩 箪 箔 管 箜 箢 箫 箓 毓 舆 僖 儆 僳 僚 僭 僬 劁 僦 僮 僧 鼻 魄 魅 魃 魆 睾 艋 鄱 貌 膜 膊 膈 膀 膑 鲑 鲔 鲙 鲚 鲛 鲜 鲟 疑 獐 獍 飗 觫 雒 孵 夤 馑 馒 ";153 $this->data[13][3]="銮 裹 敲 豪 膏 塾 遮 麽 廙 腐 瘩 瘌 瘗 瘟 瘦 瘊 瘥 瘘 瘙 廖 辣 彰 竭 韶 端 旗 旖 膂 阚 鄯 鲞 精 粼 粹 粽 糁 歉 槊 鹚 弊 熄 熘 熔 煽 熥 潢 潆 潇 漤 漆 漕 漱 漂 滹 漫 漯 漶 潋 潴 漪 漉 漳 滴 漩 漾 演 澉 漏 潍 慢 慷 慵 寨 赛 搴 寡 窬 窨 窭 察 蜜 寤 寥 谭 肇 綮 谮 褡 褙 褐 褓 褛 褊 褪 禚 谯 谰 谱 谲 ";154 $this->data[13][4]="暨 屣 鹛 隧 嫣 嫱 嫩 嫖 嫦 嫚 嫘 嫜 嫡 嫪 鼐 翟 翠 熊 凳 瞀 鹜 骠 缥 缦 缧 骡 缨 骢 缩 缪 缫 ";155 $this->data[14][0]="慧 耦 耧 瑾 璜 璀 璎 璁 璋 璇 璆 奭 撵 髯 髫 撷 撕 撒 撅 撩 趣 趟 撑 撮 撬 赭 播 墦 擒 撸 鋆 墩 撞 撤 撙 增 撺 墀 撰 聩 聪 觐 鞋 鞑 蕙 鞒 鞍 蕈 蕨 蕤 蕞 蕺 瞢 蕉 劐 蕃 蕲 蕰 蕊 赜 蔬 蕴 鼒 槿 横 樯 槽 槭 樗 樘 樱 樊 橡 槲 樟 橄 敷 鹝 豌 飘 醋 醌 醇 醉 醅 靥 魇 餍 磕 磊 磔 磙 磅 碾 磉 殣 憖 震 霄 霉 霈 辘 ";156 $this->data[14][1]="龉 龊 觑 憋 瞌 瞒 题 暴 瞎 瞑 嘻 嘭 噎 嘶 噶 嘲 颙 暹 嘹 影 踔 踝 踢 踏 踟 踬 踩 踮 踣 踯 踪 踺 踞 蝽 蝶 蝾 蝴 蝻 蝠 蝰 蝎 蝌 蝮 螋 蝗 蝓 蝣 蝼 蝤 蝙 噗 嘬 颚 嘿 噍 噢 噙 噜 噌 嘱 噀 噔 颛 幞 幡 嶓 幢 嶙 嶝 墨 骺 骼 骸 ";157 $this->data[14][2]="镊 镆 镇 镈 镉 镋 镌 镍 镎 镏 镐 镑 镒 镓 镔 靠 稽 稷 稻 黎 稿 稼 箱 箴 篑 篁 篌 篓 箭 篇 篆 僵 牖 儇 儋 躺 僻 德 徵 艘 磐 虢 鹞 鹟 膝 膘 膛 滕 鲠 鲡 鲢 鲣 鲥 鲤 鲦 鲧 鲩 鲪 鲫 鲬 橥 獗 獠 觯 鹠 馓 馔 ";158 $this->data[14][3]="熟 摩 麾 褒 廛 鹡 瘛 瘼 瘪 瘢 瘤 瘠 瘫 齑 鹡 凛 颜 毅 羯 羰 糊 糇 遴 糌 糍 糈 糅 翦 遵 鹣 憋 熜 熵 熠 潜 澍 澎 澌 潵 潮 潸 潭 潦 鲨 潲 鋈 潟 澳 潘 潼 澈 澜 潽 潺 澄 潏 懂 憬 憔 懊 憧 憎 寮 窳 额 谳 翩 褥 褴 褫 禤 谴 鹤 谵 ";159 $this->data[14][4]="憨 熨 慰 劈 履 屦 嬉 勰 戮 蝥 豫 缬 缭 缮 缯 骣 畿 ";160 $this->data[15][0]="耩 耨 耪 璞 璟 靛 璠 璘 聱 螯 髻 髭 髹 擀 撼 擂 操 熹 甏 擐 擅 擞 磬 鄹 颞 蕻 鞘 燕 黇 颟 薤 蕾 薯 薨 薛 薇 檠 擎 薪 薏 蕹 薮 薄 颠 翰 噩 薜 薅 樾 橱 橛 橇 樵 檎 橹 橦 樽 樨 橙 橘 橼 墼 整 橐 融 翮 瓢 醛 醐 醍 醒 醚 醑 觱 磺 磲 赝 飙 殪 霖 霏 霓 霍 霎 錾 辙 辚 臻 ";161 $this->data[15][1]="冀 餐 遽 氅 瞥 瞟 瞠 瞰 嚄 嚆 噤 暾 曈 蹀 蹅 踶 踹 踵 踽 嘴 踱 蹄 蹉 蹁 蹂 螨 蟒 蟆 螈 螅 螭 螗 螃 螠 螟 噱 器 噪 噬 噫 噻 噼 幪 罹 圜 鹦 赠 默 黔 ";162 $this->data[15][2]="镖 镗 镘 镚 镛 镜 镝 镞 镠 氇 氆 赞 憩 穑 穆 穄 篝 篚 篥 篮 篡 簉 篦 篪 篷 篙 篱 盥 儒 劓 翱 魉 魈 邀 徼 衡 歙 盫 膨 膪 膳 螣 膦 膙 雕 鲭 鲮 鲯 鲰 鲱 鲲 鲳 鲴 鲵 鲷 鲸 鲺 鲹 鲻 獴 獭 獬 邂 ";163 $this->data[15][3]="憝 亸 鹧 磨 廨 赟 癀 瘭 瘰 廪 瘿 瘵 瘴 癃 瘾 瘸 瘳 斓 麇 麈 凝 辨 辩 嬴 壅 羲 糙 糗 糖 糕 瞥 甑 燎 燠 燔 燃 燧 燊 燏 濑 濒 濉 潞 澧 澡 澴 激 澹 澥 澶 濂 澼 憷 懒 憾 懈 黉 褰 寰 窸 窿 褶 禧 ";164 $this->data[15][4]="壁 避 嬖 犟 隰 嬗 鹨 翯 颡 缰 缱 缲 缳 缴 ";165 $this->data[16][0]="璨 璩 璐 璪 戴 螫 擤 壕 擦 觳 罄 擢 藉 薹 鞡 鞠 藏 薷 薰 藐 藓 藁 檬 檑 檄 檐 檩 檀 懋 醢 翳 繄 礁 礅 磷 磴 鹩 霜 霞 ";166 $this->data[16][1]="龋 龌 豳 壑 黻 瞭 瞧 瞬 瞳 瞵 瞩 瞪 嚏 曙 嚅 蹑 蹒 蹋 蹈 蹊 蹓 蹐 蟥 螬 螵 疃 螳 螺 蟋 蟑 蟀 嚎 嚓 羁 罽 罾 嶷 赡 黜 黝 髁 髀 ";167 $this->data[16][2]="镡 镢 镣 镤 镥 镦 镧 镨 镩 镪 镫 罅 穗 黏 魏 簧 簌 篾 簃 篼 簏 簇 簖 簋 繁 鼢 黛 儡 鹪 鼾 皤 魍 徽 艚 龠 爵 繇 貘 邈 貔 臌 朦 臊 膻 臁 臆 臃 鲼 鲽 鲾 鳀 鳁 鳂 鳃 鳄 鳅 鳆 鳇 鳈 鳉 鳊 獯 螽 ";168 $this->data[16][3]="燮 鹫 襄 糜 縻 膺 癍 癌 麋 辫 赢 糟 糠 馘 燥 懑 濡 濮 濞 濠 濯 懦 豁 蹇 謇 邃 襕 襁 ";169 $this->data[16][4]="臀 檗 甓 臂 擘 孺 隳 嬷 翼 蟊 鹬 鍪 骤 ";170 $this->data[17][0]="鏊 鳌 鬹 鬈 鬃 瞽 藕 鞯 鞨 鞭 鞫 鞧 鞣 藜 藠 藤 藩 鹲 檫 檵 覆 醪 蹙 礞 礓 礌 燹 餮 ";171 $this->data[17][1]="蹩 瞿 瞻 曛 颢 曜 躇 蹦 鹭 蹢 蹜 蟛 蟪 蟠 蟮 嚚 嚣 鹮 黠 黟 髅 髂 ";172 $this->data[17][2]="镬 镭 镯 镰 镱 馥 簠 簟 簪 簦 鼫 鼬 鼩 雠 艟 翻 臑 鳍 鳎 鳏 鳐 鳐 鳑 鹱 ";173 $this->data[17][3]="鹰 癞 癔 癜 癖 糨 冁 瀑 瀍 瀌 鎏 懵 襟 ";174 $this->data[17][4]="璧 戳 彝 邋 ";175 $this->data[18][0]="鬏 攉 攒 鞲 鞴 藿 蘧 孽 蘅 警 蘑 藻 麓 攀 醭 醮 醯 礤 酃 霪 霭 ";176 $this->data[18][1]="黼 鳖 曝 嚯 蹰 蹶 蹽 蹼 蹯 蹴 蹾 蹲 蹭 蹿 蹬 蠖 蠓 蠋 蟾 蠊 巅 黢 髋 髌 ";177 $this->data[18][2]="镲 籀 簸 籁 簿 鳘 齁 魑 艨 鼗 鳓 鳔 鳕 鳗 鳙 鳚 蟹 ";178 $this->data[18][3]="颤 靡 癣 麒 鏖 瓣 蠃 羸 羹 爆 瀚 瀣 瀛 襦 谶 ";179 $this->data[18][4]="襞 疆 骥 缵 ";180 $this->data[19][0]="瓒 鬓 壤 攘 馨 蘩 蘖 蘘 醵 醴 霰 颥 ";181 $this->data[19][1]="酆 耀 矍 曦 躁 躅 蠕 鼍 嚼 嚷 巍 巉 黩 黥 ";182 $this->data[19][2]="镳 镴 黧 籍 纂 鼯 犨 臜 鳜 鳝 鳞 鳟 獾 ";183 $this->data[19][3]="魔 糯 灌 瀹 瀵 ";184 $this->data[19][4]="譬 孀 骧 ";185 $this->data[20][0]="耰 蠢 瓘 鼙 醺 礴 礳 霸 露 霹 ";186 $this->data[20][1]="颦 曩 躏 黯 髓 ";187 $this->data[20][2]="鼱 鳡 鳢 ";188 $this->data[20][3]="癫 麝 赣 夔 爝 灏 禳 ";189 $this->data[20][4]="鐾 羼 蠡 ";190 $this->data[21][0]="耲 耱 懿 韂 蘸 鹳 糵 蘼 囊 霾 ";191 $this->data[21][1]="氍 饕 躔 躐 髑 ";192 $this->data[21][2]="镵 镶 穰 鳤 ";193 $this->data[21][3]="瓤 饔 ";194 $this->data[21][4]="鬻 ";195 $this->data[22][0]="鬟 趱 攫 攥 颧 ";196 $this->data[22][1]="躜 ";197 $this->data[22][2]="罐 鼹 鼷 ";198 $this->data[22][3]="癯 麟 蠲 ";199 $this->data[23][0]="矗 蠹 醾 ";200 $this->data[23][1]="躞 ";201 $this->data[23][2]="衢 鑫 ";202 $this->data[23][3]="灞 襻 ";203 $this->data[24][0]="纛 鬣 攮 ";204 $this->data[24][1]="囔 ";205 $this->data[24][2]="馕 ";206 $this->data[24][3]="戆 ";207 $this->data[25][1]="蠼 ";208 $this->data[29][2]="爨 ";209 $this->data[35][2]="齉 ";210 }211}...

Full Screen

Full Screen

data.inc.php

Source:data.inc.php Github

copy

Full Screen

...35 */36/**37 * All whitespace allowed in CSS.38 */39$data['csstidy']['whitespace'] = array( ' ', "\n", "\t", "\r", "\x0B" );40/**41 * All CSS tokens used by CSSTidy.42 */43$data['csstidy']['tokens'] = '/@}{;:=\'"(,\\!$%&)*+.<>?[]^`|~';44/**45 * All CSS units (CSS3 units included).46 *47 * @see compress_numbers()48 */49$data['csstidy']['units'] = array( 'in', 'cm', 'mm', 'pt', 'pc', 'px', 'rem', 'em', '%', 'ex', 'gd', 'vw', 'vh', 'vm', 'deg', 'grad', 'rad', 'turn', 'ms', 's', 'khz', 'hz', 'ch', 'vmin', 'vmax', 'dpi', 'dpcm', 'dppx' );50/**51 * Available at-rules.52 */53$data['csstidy']['at_rules'] = array(54 'page' => 'is',55 'font-face' => 'atis',56 'charset' => 'iv',57 'import' => 'iv',58 'namespace' => 'iv',59 'media' => 'at',60 'keyframes' => 'at',61 '-moz-keyframes' => 'at',62 '-o-keyframes' => 'at',63 '-webkit-keyframes' => 'at',64 '-ms-keyframes' => 'at',65 'viewport' => 'at',66 '-webkit-viewport' => 'at',67 '-moz-viewport' => 'at',68 '-ms-viewport' => 'at',69 'supports' => 'at',70);71/**72 * Properties that need a value with unit.73 *74 * @TODO CSS3 properties.75 * @see compress_numbers();76 */77$data['csstidy']['unit_values'] = array(78 'background',79 'background-position',80 'background-size',81 'border',82 'border-top',83 'border-right',84 'border-bottom',85 'border-left',86 'border-width',87 'border-top-width',88 'border-right-width',89 'border-left-width',90 'border-bottom-width',91 'bottom',92 'border-spacing',93 'column-gap',94 'column-width',95 'font-size',96 'height',97 'left',98 'margin',99 'margin-top',100 'margin-right',101 'margin-bottom',102 'margin-left',103 'max-height',104 'max-width',105 'min-height',106 'min-width',107 'outline',108 'outline-width',109 'padding',110 'padding-top',111 'padding-right',112 'padding-bottom',113 'padding-left',114 'perspective',115 'right',116 'top',117 'text-indent',118 'letter-spacing',119 'word-spacing',120 'width',121);122/**123 * Properties that allow <color> as value.124 *125 * @TODO CSS3 properties126 * @see compress_numbers();127 */128$data['csstidy']['color_values'] = array( 'background-color', 'border-color', 'border-top-color', 'border-right-color', 'border-bottom-color', 'border-left-color', 'color', 'outline-color', 'column-rule-color' );129/**130 * Default values for the background properties.131 *132 * @TODO Possibly property names will change during CSS3 development.133 * @see dissolve_short_bg()134 * @see merge_bg()135 */136$data['csstidy']['background_prop_default'] = array();137$data['csstidy']['background_prop_default']['background-image'] = 'none';138$data['csstidy']['background_prop_default']['background-size'] = 'auto';139$data['csstidy']['background_prop_default']['background-repeat'] = 'repeat';140$data['csstidy']['background_prop_default']['background-position'] = '0 0';141$data['csstidy']['background_prop_default']['background-attachment'] = 'scroll';142$data['csstidy']['background_prop_default']['background-clip'] = 'border';143$data['csstidy']['background_prop_default']['background-origin'] = 'padding';144$data['csstidy']['background_prop_default']['background-color'] = 'transparent';145/**146 * Default values for the font properties.147 *148 * @see merge_fonts()149 */150$data['csstidy']['font_prop_default'] = array();151$data['csstidy']['font_prop_default']['font-style'] = 'normal';152$data['csstidy']['font_prop_default']['font-variant'] = 'normal';153$data['csstidy']['font_prop_default']['font-weight'] = 'normal';154$data['csstidy']['font_prop_default']['font-size'] = '';155$data['csstidy']['font_prop_default']['line-height'] = '';156$data['csstidy']['font_prop_default']['font-family'] = '';157/**158 * A list of non-W3C color names which get replaced by their hex-codes.159 *160 * @see cut_color()161 */162$data['csstidy']['replace_colors'] = array();163$data['csstidy']['replace_colors']['aliceblue'] = '#f0f8ff';164$data['csstidy']['replace_colors']['antiquewhite'] = '#faebd7';165$data['csstidy']['replace_colors']['aquamarine'] = '#7fffd4';166$data['csstidy']['replace_colors']['azure'] = '#f0ffff';167$data['csstidy']['replace_colors']['beige'] = '#f5f5dc';168$data['csstidy']['replace_colors']['bisque'] = '#ffe4c4';169$data['csstidy']['replace_colors']['blanchedalmond'] = '#ffebcd';170$data['csstidy']['replace_colors']['blueviolet'] = '#8a2be2';171$data['csstidy']['replace_colors']['brown'] = '#a52a2a';172$data['csstidy']['replace_colors']['burlywood'] = '#deb887';173$data['csstidy']['replace_colors']['cadetblue'] = '#5f9ea0';174$data['csstidy']['replace_colors']['chartreuse'] = '#7fff00';175$data['csstidy']['replace_colors']['chocolate'] = '#d2691e';176$data['csstidy']['replace_colors']['coral'] = '#ff7f50';177$data['csstidy']['replace_colors']['cornflowerblue'] = '#6495ed';178$data['csstidy']['replace_colors']['cornsilk'] = '#fff8dc';179$data['csstidy']['replace_colors']['crimson'] = '#dc143c';180$data['csstidy']['replace_colors']['cyan'] = '#00ffff';181$data['csstidy']['replace_colors']['darkblue'] = '#00008b';182$data['csstidy']['replace_colors']['darkcyan'] = '#008b8b';183$data['csstidy']['replace_colors']['darkgoldenrod'] = '#b8860b';184$data['csstidy']['replace_colors']['darkgray'] = '#a9a9a9';185$data['csstidy']['replace_colors']['darkgreen'] = '#006400';186$data['csstidy']['replace_colors']['darkkhaki'] = '#bdb76b';187$data['csstidy']['replace_colors']['darkmagenta'] = '#8b008b';188$data['csstidy']['replace_colors']['darkolivegreen'] = '#556b2f';189$data['csstidy']['replace_colors']['darkorange'] = '#ff8c00';190$data['csstidy']['replace_colors']['darkorchid'] = '#9932cc';191$data['csstidy']['replace_colors']['darkred'] = '#8b0000';192$data['csstidy']['replace_colors']['darksalmon'] = '#e9967a';193$data['csstidy']['replace_colors']['darkseagreen'] = '#8fbc8f';194$data['csstidy']['replace_colors']['darkslateblue'] = '#483d8b';195$data['csstidy']['replace_colors']['darkslategray'] = '#2f4f4f';196$data['csstidy']['replace_colors']['darkturquoise'] = '#00ced1';197$data['csstidy']['replace_colors']['darkviolet'] = '#9400d3';198$data['csstidy']['replace_colors']['deeppink'] = '#ff1493';199$data['csstidy']['replace_colors']['deepskyblue'] = '#00bfff';200$data['csstidy']['replace_colors']['dimgray'] = '#696969';201$data['csstidy']['replace_colors']['dodgerblue'] = '#1e90ff';202$data['csstidy']['replace_colors']['feldspar'] = '#d19275';203$data['csstidy']['replace_colors']['firebrick'] = '#b22222';204$data['csstidy']['replace_colors']['floralwhite'] = '#fffaf0';205$data['csstidy']['replace_colors']['forestgreen'] = '#228b22';206$data['csstidy']['replace_colors']['gainsboro'] = '#dcdcdc';207$data['csstidy']['replace_colors']['ghostwhite'] = '#f8f8ff';208$data['csstidy']['replace_colors']['gold'] = '#ffd700';209$data['csstidy']['replace_colors']['goldenrod'] = '#daa520';210$data['csstidy']['replace_colors']['greenyellow'] = '#adff2f';211$data['csstidy']['replace_colors']['honeydew'] = '#f0fff0';212$data['csstidy']['replace_colors']['hotpink'] = '#ff69b4';213$data['csstidy']['replace_colors']['indianred'] = '#cd5c5c';214$data['csstidy']['replace_colors']['indigo'] = '#4b0082';215$data['csstidy']['replace_colors']['ivory'] = '#fffff0';216$data['csstidy']['replace_colors']['khaki'] = '#f0e68c';217$data['csstidy']['replace_colors']['lavender'] = '#e6e6fa';218$data['csstidy']['replace_colors']['lavenderblush'] = '#fff0f5';219$data['csstidy']['replace_colors']['lawngreen'] = '#7cfc00';220$data['csstidy']['replace_colors']['lemonchiffon'] = '#fffacd';221$data['csstidy']['replace_colors']['lightblue'] = '#add8e6';222$data['csstidy']['replace_colors']['lightcoral'] = '#f08080';223$data['csstidy']['replace_colors']['lightcyan'] = '#e0ffff';224$data['csstidy']['replace_colors']['lightgoldenrodyellow'] = '#fafad2';225$data['csstidy']['replace_colors']['lightgrey'] = '#d3d3d3';226$data['csstidy']['replace_colors']['lightgreen'] = '#90ee90';227$data['csstidy']['replace_colors']['lightpink'] = '#ffb6c1';228$data['csstidy']['replace_colors']['lightsalmon'] = '#ffa07a';229$data['csstidy']['replace_colors']['lightseagreen'] = '#20b2aa';230$data['csstidy']['replace_colors']['lightskyblue'] = '#87cefa';231$data['csstidy']['replace_colors']['lightslateblue'] = '#8470ff';232$data['csstidy']['replace_colors']['lightslategray'] = '#778899';233$data['csstidy']['replace_colors']['lightsteelblue'] = '#b0c4de';234$data['csstidy']['replace_colors']['lightyellow'] = '#ffffe0';235$data['csstidy']['replace_colors']['limegreen'] = '#32cd32';236$data['csstidy']['replace_colors']['linen'] = '#faf0e6';237$data['csstidy']['replace_colors']['magenta'] = '#ff00ff';238$data['csstidy']['replace_colors']['mediumaquamarine'] = '#66cdaa';239$data['csstidy']['replace_colors']['mediumblue'] = '#0000cd';240$data['csstidy']['replace_colors']['mediumorchid'] = '#ba55d3';241$data['csstidy']['replace_colors']['mediumpurple'] = '#9370d8';242$data['csstidy']['replace_colors']['mediumseagreen'] = '#3cb371';243$data['csstidy']['replace_colors']['mediumslateblue'] = '#7b68ee';244$data['csstidy']['replace_colors']['mediumspringgreen'] = '#00fa9a';245$data['csstidy']['replace_colors']['mediumturquoise'] = '#48d1cc';246$data['csstidy']['replace_colors']['mediumvioletred'] = '#c71585';247$data['csstidy']['replace_colors']['midnightblue'] = '#191970';248$data['csstidy']['replace_colors']['mintcream'] = '#f5fffa';249$data['csstidy']['replace_colors']['mistyrose'] = '#ffe4e1';250$data['csstidy']['replace_colors']['moccasin'] = '#ffe4b5';251$data['csstidy']['replace_colors']['navajowhite'] = '#ffdead';252$data['csstidy']['replace_colors']['oldlace'] = '#fdf5e6';253$data['csstidy']['replace_colors']['olivedrab'] = '#6b8e23';254$data['csstidy']['replace_colors']['orangered'] = '#ff4500';255$data['csstidy']['replace_colors']['orchid'] = '#da70d6';256$data['csstidy']['replace_colors']['palegoldenrod'] = '#eee8aa';257$data['csstidy']['replace_colors']['palegreen'] = '#98fb98';258$data['csstidy']['replace_colors']['paleturquoise'] = '#afeeee';259$data['csstidy']['replace_colors']['palevioletred'] = '#d87093';260$data['csstidy']['replace_colors']['papayawhip'] = '#ffefd5';261$data['csstidy']['replace_colors']['peachpuff'] = '#ffdab9';262$data['csstidy']['replace_colors']['peru'] = '#cd853f';263$data['csstidy']['replace_colors']['pink'] = '#ffc0cb';264$data['csstidy']['replace_colors']['plum'] = '#dda0dd';265$data['csstidy']['replace_colors']['powderblue'] = '#b0e0e6';266$data['csstidy']['replace_colors']['rosybrown'] = '#bc8f8f';267$data['csstidy']['replace_colors']['royalblue'] = '#4169e1';268$data['csstidy']['replace_colors']['saddlebrown'] = '#8b4513';269$data['csstidy']['replace_colors']['salmon'] = '#fa8072';270$data['csstidy']['replace_colors']['sandybrown'] = '#f4a460';271$data['csstidy']['replace_colors']['seagreen'] = '#2e8b57';272$data['csstidy']['replace_colors']['seashell'] = '#fff5ee';273$data['csstidy']['replace_colors']['sienna'] = '#a0522d';274$data['csstidy']['replace_colors']['skyblue'] = '#87ceeb';275$data['csstidy']['replace_colors']['slateblue'] = '#6a5acd';276$data['csstidy']['replace_colors']['slategray'] = '#708090';277$data['csstidy']['replace_colors']['snow'] = '#fffafa';278$data['csstidy']['replace_colors']['springgreen'] = '#00ff7f';279$data['csstidy']['replace_colors']['steelblue'] = '#4682b4';280$data['csstidy']['replace_colors']['tan'] = '#d2b48c';281$data['csstidy']['replace_colors']['thistle'] = '#d8bfd8';282$data['csstidy']['replace_colors']['tomato'] = '#ff6347';283$data['csstidy']['replace_colors']['turquoise'] = '#40e0d0';284$data['csstidy']['replace_colors']['violet'] = '#ee82ee';285$data['csstidy']['replace_colors']['violetred'] = '#d02090';286$data['csstidy']['replace_colors']['wheat'] = '#f5deb3';287$data['csstidy']['replace_colors']['whitesmoke'] = '#f5f5f5';288$data['csstidy']['replace_colors']['yellowgreen'] = '#9acd32';289/**290 * A list of all shorthand properties that are divided into four properties and/or have four subvalues.291 *292 * @TODO Are there new ones in CSS3?293 * @see dissolve_4value_shorthands()294 * @see merge_4value_shorthands()295 */296$data['csstidy']['shorthands'] = array();297$data['csstidy']['shorthands']['border-color'] = array( 'border-top-color', 'border-right-color', 'border-bottom-color', 'border-left-color' );298$data['csstidy']['shorthands']['border-style'] = array( 'border-top-style', 'border-right-style', 'border-bottom-style', 'border-left-style' );299$data['csstidy']['shorthands']['border-width'] = array( 'border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width' );300$data['csstidy']['shorthands']['margin'] = array( 'margin-top', 'margin-right', 'margin-bottom', 'margin-left' );301$data['csstidy']['shorthands']['padding'] = array( 'padding-top', 'padding-right', 'padding-bottom', 'padding-left' );302$data['csstidy']['shorthands']['-moz-border-radius'] = 0;303/**304 * All CSS Properties.305 *306 * @see CSSTidy::property_is_next()307 */308$data['csstidy']['all_properties']['align-content'] = 'CSS3.0';309$data['csstidy']['all_properties']['align-items'] = 'CSS3.0';310$data['csstidy']['all_properties']['align-self'] = 'CSS3.0';311$data['csstidy']['all_properties']['alignment-adjust'] = 'CSS3.0';312$data['csstidy']['all_properties']['alignment-baseline'] = 'CSS3.0';313$data['csstidy']['all_properties']['animation'] = 'CSS3.0';314$data['csstidy']['all_properties']['animation-delay'] = 'CSS3.0';315$data['csstidy']['all_properties']['animation-direction'] = 'CSS3.0';316$data['csstidy']['all_properties']['animation-duration'] = 'CSS3.0';317$data['csstidy']['all_properties']['animation-fill-mode'] = 'CSS3.0';318$data['csstidy']['all_properties']['animation-iteration-count'] = 'CSS3.0';319$data['csstidy']['all_properties']['animation-name'] = 'CSS3.0';320$data['csstidy']['all_properties']['animation-play-state'] = 'CSS3.0';321$data['csstidy']['all_properties']['animation-timing-function'] = 'CSS3.0';322$data['csstidy']['all_properties']['appearance'] = 'CSS3.0';323$data['csstidy']['all_properties']['azimuth'] = 'CSS2.0,CSS2.1,CSS3.0';324$data['csstidy']['all_properties']['backface-visibility'] = 'CSS3.0';325$data['csstidy']['all_properties']['background'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';326$data['csstidy']['all_properties']['background-attachment'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';327$data['csstidy']['all_properties']['background-clip'] = 'CSS3.0';328$data['csstidy']['all_properties']['background-color'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';329$data['csstidy']['all_properties']['background-image'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';330$data['csstidy']['all_properties']['background-origin'] = 'CSS3.0';331$data['csstidy']['all_properties']['background-position'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';332$data['csstidy']['all_properties']['background-repeat'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';333$data['csstidy']['all_properties']['background-size'] = 'CSS3.0';334$data['csstidy']['all_properties']['baseline-shift'] = 'CSS3.0';335$data['csstidy']['all_properties']['binding'] = 'CSS3.0';336$data['csstidy']['all_properties']['bleed'] = 'CSS3.0';337$data['csstidy']['all_properties']['bookmark-label'] = 'CSS3.0';338$data['csstidy']['all_properties']['bookmark-level'] = 'CSS3.0';339$data['csstidy']['all_properties']['bookmark-state'] = 'CSS3.0';340$data['csstidy']['all_properties']['bookmark-target'] = 'CSS3.0';341$data['csstidy']['all_properties']['border'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';342$data['csstidy']['all_properties']['border-bottom'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';343$data['csstidy']['all_properties']['border-bottom-color'] = 'CSS2.0,CSS2.1,CSS3.0';344$data['csstidy']['all_properties']['border-bottom-left-radius'] = 'CSS3.0';345$data['csstidy']['all_properties']['border-bottom-right-radius'] = 'CSS3.0';346$data['csstidy']['all_properties']['border-bottom-style'] = 'CSS2.0,CSS2.1,CSS3.0';347$data['csstidy']['all_properties']['border-bottom-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';348$data['csstidy']['all_properties']['border-collapse'] = 'CSS2.0,CSS2.1,CSS3.0';349$data['csstidy']['all_properties']['border-color'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';350$data['csstidy']['all_properties']['border-image'] = 'CSS3.0';351$data['csstidy']['all_properties']['border-image-outset'] = 'CSS3.0';352$data['csstidy']['all_properties']['border-image-repeat'] = 'CSS3.0';353$data['csstidy']['all_properties']['border-image-slice'] = 'CSS3.0';354$data['csstidy']['all_properties']['border-image-source'] = 'CSS3.0';355$data['csstidy']['all_properties']['border-image-width'] = 'CSS3.0';356$data['csstidy']['all_properties']['border-left'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';357$data['csstidy']['all_properties']['border-left-color'] = 'CSS2.0,CSS2.1,CSS3.0';358$data['csstidy']['all_properties']['border-left-style'] = 'CSS2.0,CSS2.1,CSS3.0';359$data['csstidy']['all_properties']['border-left-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';360$data['csstidy']['all_properties']['border-radius'] = 'CSS3.0';361$data['csstidy']['all_properties']['border-right'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';362$data['csstidy']['all_properties']['border-right-color'] = 'CSS2.0,CSS2.1,CSS3.0';363$data['csstidy']['all_properties']['border-right-style'] = 'CSS2.0,CSS2.1,CSS3.0';364$data['csstidy']['all_properties']['border-right-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';365$data['csstidy']['all_properties']['border-spacing'] = 'CSS2.0,CSS2.1,CSS3.0';366$data['csstidy']['all_properties']['border-style'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';367$data['csstidy']['all_properties']['border-top'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';368$data['csstidy']['all_properties']['border-top-color'] = 'CSS2.0,CSS2.1,CSS3.0';369$data['csstidy']['all_properties']['border-top-left-radius'] = 'CSS3.0';370$data['csstidy']['all_properties']['border-top-right-radius'] = 'CSS3.0';371$data['csstidy']['all_properties']['border-top-style'] = 'CSS2.0,CSS2.1,CSS3.0';372$data['csstidy']['all_properties']['border-top-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';373$data['csstidy']['all_properties']['border-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';374$data['csstidy']['all_properties']['bottom'] = 'CSS2.0,CSS2.1,CSS3.0';375$data['csstidy']['all_properties']['box-decoration-break'] = 'CSS3.0';376$data['csstidy']['all_properties']['box-shadow'] = 'CSS3.0';377$data['csstidy']['all_properties']['box-sizing'] = 'CSS3.0';378$data['csstidy']['all_properties']['break-after'] = 'CSS3.0';379$data['csstidy']['all_properties']['break-before'] = 'CSS3.0';380$data['csstidy']['all_properties']['break-inside'] = 'CSS3.0';381$data['csstidy']['all_properties']['caption-side'] = 'CSS2.0,CSS2.1,CSS3.0';382$data['csstidy']['all_properties']['clear'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';383$data['csstidy']['all_properties']['clip'] = 'CSS2.0,CSS2.1,CSS3.0';384$data['csstidy']['all_properties']['color'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';385$data['csstidy']['all_properties']['color-profile'] = 'CSS3.0';386$data['csstidy']['all_properties']['column-count'] = 'CSS3.0';387$data['csstidy']['all_properties']['column-fill'] = 'CSS3.0';388$data['csstidy']['all_properties']['column-gap'] = 'CSS3.0';389$data['csstidy']['all_properties']['column-rule'] = 'CSS3.0';390$data['csstidy']['all_properties']['column-rule-color'] = 'CSS3.0';391$data['csstidy']['all_properties']['column-rule-style'] = 'CSS3.0';392$data['csstidy']['all_properties']['column-rule-width'] = 'CSS3.0';393$data['csstidy']['all_properties']['column-span'] = 'CSS3.0';394$data['csstidy']['all_properties']['column-width'] = 'CSS3.0';395$data['csstidy']['all_properties']['columns'] = 'CSS3.0';396$data['csstidy']['all_properties']['content'] = 'CSS2.0,CSS2.1,CSS3.0';397$data['csstidy']['all_properties']['counter-increment'] = 'CSS2.0,CSS2.1,CSS3.0';398$data['csstidy']['all_properties']['counter-reset'] = 'CSS2.0,CSS2.1,CSS3.0';399$data['csstidy']['all_properties']['crop'] = 'CSS3.0';400$data['csstidy']['all_properties']['cue'] = 'CSS2.0,CSS2.1,CSS3.0';401$data['csstidy']['all_properties']['cue-after'] = 'CSS2.0,CSS2.1,CSS3.0';402$data['csstidy']['all_properties']['cue-before'] = 'CSS2.0,CSS2.1,CSS3.0';403$data['csstidy']['all_properties']['cursor'] = 'CSS2.0,CSS2.1,CSS3.0';404$data['csstidy']['all_properties']['direction'] = 'CSS2.0,CSS2.1,CSS3.0';405$data['csstidy']['all_properties']['display'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';406$data['csstidy']['all_properties']['dominant-baseline'] = 'CSS3.0';407$data['csstidy']['all_properties']['drop-initial-after-adjust'] = 'CSS3.0';408$data['csstidy']['all_properties']['drop-initial-after-align'] = 'CSS3.0';409$data['csstidy']['all_properties']['drop-initial-before-adjust'] = 'CSS3.0';410$data['csstidy']['all_properties']['drop-initial-before-align'] = 'CSS3.0';411$data['csstidy']['all_properties']['drop-initial-size'] = 'CSS3.0';412$data['csstidy']['all_properties']['drop-initial-value'] = 'CSS3.0';413$data['csstidy']['all_properties']['elevation'] = 'CSS2.0,CSS2.1,CSS3.0';414$data['csstidy']['all_properties']['empty-cells'] = 'CSS2.0,CSS2.1,CSS3.0';415$data['csstidy']['all_properties']['fill'] = 'CSS3.0';416$data['csstidy']['all_properties']['fit'] = 'CSS3.0';417$data['csstidy']['all_properties']['fit-position'] = 'CSS3.0';418$data['csstidy']['all_properties']['flex'] = 'CSS3.0';419$data['csstidy']['all_properties']['flex-align'] = 'CSS3.0';420$data['csstidy']['all_properties']['flex-basis'] = 'CSS3.0';421$data['csstidy']['all_properties']['flex-direction'] = 'CSS3.0';422$data['csstidy']['all_properties']['flex-flow'] = 'CSS3.0';423$data['csstidy']['all_properties']['flex-grow'] = 'CSS3.0';424$data['csstidy']['all_properties']['flex-line-pack'] = 'CSS3.0';425$data['csstidy']['all_properties']['flex-order'] = 'CSS3.0';426$data['csstidy']['all_properties']['flex-pack'] = 'CSS3.0';427$data['csstidy']['all_properties']['flex-shrink'] = 'CSS3.0';428$data['csstidy']['all_properties']['flex-wrap'] = 'CSS3.0';429$data['csstidy']['all_properties']['float'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';430$data['csstidy']['all_properties']['float-offset'] = 'CSS3.0';431$data['csstidy']['all_properties']['font'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';432$data['csstidy']['all_properties']['font-family'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';433$data['csstidy']['all_properties']['font-size'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';434$data['csstidy']['all_properties']['font-size-adjust'] = 'CSS2.0,CSS3.0';435$data['csstidy']['all_properties']['font-stretch'] = 'CSS2.0,CSS3.0';436$data['csstidy']['all_properties']['font-style'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';437$data['csstidy']['all_properties']['font-variant'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';438$data['csstidy']['all_properties']['font-weight'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';439$data['csstidy']['all_properties']['grid'] = 'CSS3.0';440$data['csstidy']['all_properties']['grid-area'] = 'CSS3.0';441$data['csstidy']['all_properties']['grid-auto-columns'] = 'CSS3.0';442$data['csstidy']['all_properties']['grid-auto-flow'] = 'CSS3.0';443$data['csstidy']['all_properties']['grid-auto-rows'] = 'CSS3.0';444$data['csstidy']['all_properties']['grid-column'] = 'CSS3.0';445$data['csstidy']['all_properties']['grid-columns'] = 'CSS3.0';446$data['csstidy']['all_properties']['grid-column-end'] = 'CSS3.0';447$data['csstidy']['all_properties']['grid-column-gap'] = 'CSS3.0';448$data['csstidy']['all_properties']['grid-column-start'] = 'CSS3.0';449$data['csstidy']['all_properties']['grid-gap'] = 'CSS3.0';450$data['csstidy']['all_properties']['grid-row'] = 'CSS3.0';451$data['csstidy']['all_properties']['grid-rows'] = 'CSS3.0';452$data['csstidy']['all_properties']['grid-row-end'] = 'CSS3.0';453$data['csstidy']['all_properties']['grid-row-gap'] = 'CSS3.0';454$data['csstidy']['all_properties']['grid-row-start'] = 'CSS3.0';455$data['csstidy']['all_properties']['grid-template'] = 'CSS3.0';456$data['csstidy']['all_properties']['grid-template-areas'] = 'CSS3.0';457$data['csstidy']['all_properties']['grid-template-columns'] = 'CSS3.0';458$data['csstidy']['all_properties']['grid-template-rows'] = 'CSS3.0';459$data['csstidy']['all_properties']['hanging-punctuation'] = 'CSS3.0';460$data['csstidy']['all_properties']['height'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';461$data['csstidy']['all_properties']['hyphenate-after'] = 'CSS3.0';462$data['csstidy']['all_properties']['hyphenate-before'] = 'CSS3.0';463$data['csstidy']['all_properties']['hyphenate-character'] = 'CSS3.0';464$data['csstidy']['all_properties']['hyphenate-lines'] = 'CSS3.0';465$data['csstidy']['all_properties']['hyphenate-resource'] = 'CSS3.0';466$data['csstidy']['all_properties']['hyphens'] = 'CSS3.0';467$data['csstidy']['all_properties']['icon'] = 'CSS3.0';468$data['csstidy']['all_properties']['image-orientation'] = 'CSS3.0';469$data['csstidy']['all_properties']['image-rendering'] = 'CSS3.0';470$data['csstidy']['all_properties']['image-resolution'] = 'CSS3.0';471$data['csstidy']['all_properties']['inline-box-align'] = 'CSS3.0';472$data['csstidy']['all_properties']['justify-content'] = 'CSS3.0';473$data['csstidy']['all_properties']['justify-items'] = 'CSS3.0';474$data['csstidy']['all_properties']['justify-self'] = 'CSS3.0';475$data['csstidy']['all_properties']['left'] = 'CSS2.0,CSS2.1,CSS3.0';476$data['csstidy']['all_properties']['letter-spacing'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';477$data['csstidy']['all_properties']['line-break'] = 'CSS3.0';478$data['csstidy']['all_properties']['line-height'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';479$data['csstidy']['all_properties']['line-stacking'] = 'CSS3.0';480$data['csstidy']['all_properties']['line-stacking-ruby'] = 'CSS3.0';481$data['csstidy']['all_properties']['line-stacking-shift'] = 'CSS3.0';482$data['csstidy']['all_properties']['line-stacking-strategy'] = 'CSS3.0';483$data['csstidy']['all_properties']['list-style'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';484$data['csstidy']['all_properties']['list-style-image'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';485$data['csstidy']['all_properties']['list-style-position'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';486$data['csstidy']['all_properties']['list-style-type'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';487$data['csstidy']['all_properties']['margin'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';488$data['csstidy']['all_properties']['margin-bottom'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';489$data['csstidy']['all_properties']['margin-left'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';490$data['csstidy']['all_properties']['margin-right'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';491$data['csstidy']['all_properties']['margin-top'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';492$data['csstidy']['all_properties']['marker-offset'] = 'CSS2.0,CSS3.0';493$data['csstidy']['all_properties']['marks'] = 'CSS2.0,CSS3.0';494$data['csstidy']['all_properties']['marquee-direction'] = 'CSS3.0';495$data['csstidy']['all_properties']['marquee-loop'] = 'CSS3.0';496$data['csstidy']['all_properties']['marquee-play-count'] = 'CSS3.0';497$data['csstidy']['all_properties']['marquee-speed'] = 'CSS3.0';498$data['csstidy']['all_properties']['marquee-style'] = 'CSS3.0';499$data['csstidy']['all_properties']['max-height'] = 'CSS2.0,CSS2.1,CSS3.0';500$data['csstidy']['all_properties']['max-width'] = 'CSS2.0,CSS2.1,CSS3.0';501$data['csstidy']['all_properties']['min-height'] = 'CSS2.0,CSS2.1,CSS3.0';502$data['csstidy']['all_properties']['min-width'] = 'CSS2.0,CSS2.1,CSS3.0';503$data['csstidy']['all_properties']['move-to'] = 'CSS3.0';504$data['csstidy']['all_properties']['nav-down'] = 'CSS3.0';505$data['csstidy']['all_properties']['nav-index'] = 'CSS3.0';506$data['csstidy']['all_properties']['nav-left'] = 'CSS3.0';507$data['csstidy']['all_properties']['nav-right'] = 'CSS3.0';508$data['csstidy']['all_properties']['nav-up'] = 'CSS3.0';509$data['csstidy']['all_properties']['opacity'] = 'CSS3.0';510$data['csstidy']['all_properties']['order'] = 'CSS3.0';511$data['csstidy']['all_properties']['orphans'] = 'CSS2.0,CSS2.1,CSS3.0';512$data['csstidy']['all_properties']['outline'] = 'CSS2.0,CSS2.1,CSS3.0';513$data['csstidy']['all_properties']['outline-color'] = 'CSS2.0,CSS2.1,CSS3.0';514$data['csstidy']['all_properties']['outline-offset'] = 'CSS3.0';515$data['csstidy']['all_properties']['outline-style'] = 'CSS2.0,CSS2.1,CSS3.0';516$data['csstidy']['all_properties']['outline-width'] = 'CSS2.0,CSS2.1,CSS3.0';517$data['csstidy']['all_properties']['overflow'] = 'CSS2.0,CSS2.1,CSS3.0';518$data['csstidy']['all_properties']['overflow-style'] = 'CSS3.0';519$data['csstidy']['all_properties']['overflow-wrap'] = 'CSS3.0';520$data['csstidy']['all_properties']['overflow-x'] = 'CSS3.0';521$data['csstidy']['all_properties']['overflow-y'] = 'CSS3.0';522$data['csstidy']['all_properties']['padding'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';523$data['csstidy']['all_properties']['padding-bottom'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';524$data['csstidy']['all_properties']['padding-left'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';525$data['csstidy']['all_properties']['padding-right'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';526$data['csstidy']['all_properties']['padding-top'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';527$data['csstidy']['all_properties']['page'] = 'CSS2.0,CSS3.0';528$data['csstidy']['all_properties']['page-break-after'] = 'CSS2.0,CSS2.1,CSS3.0';529$data['csstidy']['all_properties']['page-break-before'] = 'CSS2.0,CSS2.1,CSS3.0';530$data['csstidy']['all_properties']['page-break-inside'] = 'CSS2.0,CSS2.1,CSS3.0';531$data['csstidy']['all_properties']['page-policy'] = 'CSS3.0';532$data['csstidy']['all_properties']['pause'] = 'CSS2.0,CSS2.1,CSS3.0';533$data['csstidy']['all_properties']['pause-after'] = 'CSS2.0,CSS2.1,CSS3.0';534$data['csstidy']['all_properties']['pause-before'] = 'CSS2.0,CSS2.1,CSS3.0';535$data['csstidy']['all_properties']['perspective'] = 'CSS3.0';536$data['csstidy']['all_properties']['perspective-origin'] = 'CSS3.0';537$data['csstidy']['all_properties']['phonemes'] = 'CSS3.0';538$data['csstidy']['all_properties']['pitch'] = 'CSS2.0,CSS2.1,CSS3.0';539$data['csstidy']['all_properties']['pitch-range'] = 'CSS2.0,CSS2.1,CSS3.0';540$data['csstidy']['all_properties']['play-during'] = 'CSS2.0,CSS2.1,CSS3.0';541$data['csstidy']['all_properties']['position'] = 'CSS2.0,CSS2.1,CSS3.0';542$data['csstidy']['all_properties']['presentation-level'] = 'CSS3.0';543$data['csstidy']['all_properties']['punctuation-trim'] = 'CSS3.0';544$data['csstidy']['all_properties']['quotes'] = 'CSS2.0,CSS2.1,CSS3.0';545$data['csstidy']['all_properties']['rendering-intent'] = 'CSS3.0';546$data['csstidy']['all_properties']['resize'] = 'CSS3.0';547$data['csstidy']['all_properties']['rest'] = 'CSS3.0';548$data['csstidy']['all_properties']['rest-after'] = 'CSS3.0';549$data['csstidy']['all_properties']['rest-before'] = 'CSS3.0';550$data['csstidy']['all_properties']['richness'] = 'CSS2.0,CSS2.1,CSS3.0';551$data['csstidy']['all_properties']['right'] = 'CSS2.0,CSS2.1,CSS3.0';552$data['csstidy']['all_properties']['rotation'] = 'CSS3.0';553$data['csstidy']['all_properties']['rotation-point'] = 'CSS3.0';554$data['csstidy']['all_properties']['ruby-align'] = 'CSS3.0';555$data['csstidy']['all_properties']['ruby-overhang'] = 'CSS3.0';556$data['csstidy']['all_properties']['ruby-position'] = 'CSS3.0';557$data['csstidy']['all_properties']['ruby-span'] = 'CSS3.0';558$data['csstidy']['all_properties']['size'] = 'CSS2.0,CSS3.0';559$data['csstidy']['all_properties']['speak'] = 'CSS2.0,CSS2.1,CSS3.0';560$data['csstidy']['all_properties']['speak-header'] = 'CSS2.0,CSS2.1,CSS3.0';561$data['csstidy']['all_properties']['speak-numeral'] = 'CSS2.0,CSS2.1,CSS3.0';562$data['csstidy']['all_properties']['speak-punctuation'] = 'CSS2.0,CSS2.1,CSS3.0';563$data['csstidy']['all_properties']['speech-rate'] = 'CSS2.0,CSS2.1,CSS3.0';564$data['csstidy']['all_properties']['src'] = 'CSS3.0';565$data['csstidy']['all_properties']['stress'] = 'CSS2.0,CSS2.1,CSS3.0';566$data['csstidy']['all_properties']['string-set'] = 'CSS3.0';567$data['csstidy']['all_properties']['stroke'] = 'CSS3.0';568$data['csstidy']['all_properties']['tab-size'] = 'CSS3.0';569$data['csstidy']['all_properties']['table-layout'] = 'CSS2.0,CSS2.1,CSS3.0';570$data['csstidy']['all_properties']['target'] = 'CSS3.0';571$data['csstidy']['all_properties']['target-name'] = 'CSS3.0';572$data['csstidy']['all_properties']['target-new'] = 'CSS3.0';573$data['csstidy']['all_properties']['target-position'] = 'CSS3.0';574$data['csstidy']['all_properties']['text-align'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';575$data['csstidy']['all_properties']['text-align-last'] = 'CSS3.0';576$data['csstidy']['all_properties']['text-decoration'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';577$data['csstidy']['all_properties']['text-decoration-color'] = 'CSS3.0';578$data['csstidy']['all_properties']['text-decoration-line'] = 'CSS3.0';579$data['csstidy']['all_properties']['text-decoration-skip'] = 'CSS3.0';580$data['csstidy']['all_properties']['text-decoration-style'] = 'CSS3.0';581$data['csstidy']['all_properties']['text-emphasis'] = 'CSS3.0';582$data['csstidy']['all_properties']['text-emphasis-color'] = 'CSS3.0';583$data['csstidy']['all_properties']['text-emphasis-position'] = 'CSS3.0';584$data['csstidy']['all_properties']['text-emphasis-style'] = 'CSS3.0';585$data['csstidy']['all_properties']['text-height'] = 'CSS3.0';586$data['csstidy']['all_properties']['text-indent'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';587$data['csstidy']['all_properties']['text-justify'] = 'CSS3.0';588$data['csstidy']['all_properties']['text-outline'] = 'CSS3.0';589$data['csstidy']['all_properties']['text-shadow'] = 'CSS2.0,CSS3.0';590$data['csstidy']['all_properties']['text-space-collapse'] = 'CSS3.0';591$data['csstidy']['all_properties']['text-transform'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';592$data['csstidy']['all_properties']['text-underline-position'] = 'CSS3.0';593$data['csstidy']['all_properties']['text-wrap'] = 'CSS3.0';594$data['csstidy']['all_properties']['top'] = 'CSS2.0,CSS2.1,CSS3.0';595$data['csstidy']['all_properties']['transform'] = 'CSS3.0';596$data['csstidy']['all_properties']['transform-origin'] = 'CSS3.0';597$data['csstidy']['all_properties']['transform-style'] = 'CSS3.0';598$data['csstidy']['all_properties']['transition'] = 'CSS3.0';599$data['csstidy']['all_properties']['transition-delay'] = 'CSS3.0';600$data['csstidy']['all_properties']['transition-duration'] = 'CSS3.0';601$data['csstidy']['all_properties']['transition-property'] = 'CSS3.0';602$data['csstidy']['all_properties']['transition-timing-function'] = 'CSS3.0';603$data['csstidy']['all_properties']['unicode-bidi'] = 'CSS2.0,CSS2.1,CSS3.0';604$data['csstidy']['all_properties']['vertical-align'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';605$data['csstidy']['all_properties']['visibility'] = 'CSS2.0,CSS2.1,CSS3.0';606$data['csstidy']['all_properties']['voice-balance'] = 'CSS3.0';607$data['csstidy']['all_properties']['voice-duration'] = 'CSS3.0';608$data['csstidy']['all_properties']['voice-family'] = 'CSS2.0,CSS2.1,CSS3.0';609$data['csstidy']['all_properties']['voice-pitch'] = 'CSS3.0';610$data['csstidy']['all_properties']['voice-pitch-range'] = 'CSS3.0';611$data['csstidy']['all_properties']['voice-rate'] = 'CSS3.0';612$data['csstidy']['all_properties']['voice-stress'] = 'CSS3.0';613$data['csstidy']['all_properties']['voice-volume'] = 'CSS3.0';614$data['csstidy']['all_properties']['volume'] = 'CSS2.0,CSS2.1,CSS3.0';615$data['csstidy']['all_properties']['white-space'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';616$data['csstidy']['all_properties']['widows'] = 'CSS2.0,CSS2.1,CSS3.0';617$data['csstidy']['all_properties']['width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';618$data['csstidy']['all_properties']['word-break'] = 'CSS3.0';619$data['csstidy']['all_properties']['word-spacing'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';620$data['csstidy']['all_properties']['word-wrap'] = 'CSS3.0';621$data['csstidy']['all_properties']['z-index'] = 'CSS2.0,CSS2.1,CSS3.0';622/**623 * An array containing all properties that can accept a quoted string as a value.624 */625$data['csstidy']['quoted_string_properties'] = array( 'content', 'font', 'font-family', 'quotes' );626/**627 * An array containing all properties that can be defined multiple times without being overwritten.628 * All unit values are included so that units like rem can be supported with fallbacks to px or em.629 */630$data['csstidy']['multiple_properties'] = array_merge( $data['csstidy']['color_values'], $data['csstidy']['unit_values'], array( 'transition', 'background-image', 'border-image', 'list-style-image' ) );631/**632 * An array containing all predefined templates.633 *634 * @see CSSTidy::load_template()635 */636$data['csstidy']['predefined_templates']['default'][] = '<span class="at">'; //string before @rule637$data['csstidy']['predefined_templates']['default'][] = '</span> <span class="format">{</span>' . "\n"; //bracket after @-rule638$data['csstidy']['predefined_templates']['default'][] = '<span class="selector">'; //string before selector639$data['csstidy']['predefined_templates']['default'][] = '</span> <span class="format">{</span>' . "\n"; //bracket after selector640$data['csstidy']['predefined_templates']['default'][] = '<span class="property">'; //string before property641$data['csstidy']['predefined_templates']['default'][] = '</span><span class="value">'; //string after property+before value642$data['csstidy']['predefined_templates']['default'][] = '</span><span class="format">;</span>' . "\n"; //string after value643$data['csstidy']['predefined_templates']['default'][] = '<span class="format">}</span>'; //closing bracket - selector644$data['csstidy']['predefined_templates']['default'][] = "\n\n"; //space between blocks {...}645$data['csstidy']['predefined_templates']['default'][] = "\n" . '<span class="format">}</span>' . "\n\n"; //closing bracket @-rule646$data['csstidy']['predefined_templates']['default'][] = ''; //indent in @-rule647$data['csstidy']['predefined_templates']['default'][] = '<span class="comment">'; // before comment648$data['csstidy']['predefined_templates']['default'][] = '</span>' . "\n"; // after comment649$data['csstidy']['predefined_templates']['default'][] = "\n"; // after each line @-rule650$data['csstidy']['predefined_templates']['high_compression'][] = '<span class="at">';651$data['csstidy']['predefined_templates']['high_compression'][] = '</span> <span class="format">{</span>' . "\n";652$data['csstidy']['predefined_templates']['high_compression'][] = '<span class="selector">';653$data['csstidy']['predefined_templates']['high_compression'][] = '</span><span class="format">{</span>';654$data['csstidy']['predefined_templates']['high_compression'][] = '<span class="property">';655$data['csstidy']['predefined_templates']['high_compression'][] = '</span><span class="value">';656$data['csstidy']['predefined_templates']['high_compression'][] = '</span><span class="format">;</span>';657$data['csstidy']['predefined_templates']['high_compression'][] = '<span class="format">}</span>';658$data['csstidy']['predefined_templates']['high_compression'][] = "\n";659$data['csstidy']['predefined_templates']['high_compression'][] = "\n" . '<span class="format">}' . "\n" . '</span>';660$data['csstidy']['predefined_templates']['high_compression'][] = '';661$data['csstidy']['predefined_templates']['high_compression'][] = '<span class="comment">'; // before comment662$data['csstidy']['predefined_templates']['high_compression'][] = '</span>'; // after comment663$data['csstidy']['predefined_templates']['high_compression'][] = "\n";664$data['csstidy']['predefined_templates']['highest_compression'][] = '<span class="at">';665$data['csstidy']['predefined_templates']['highest_compression'][] = '</span><span class="format">{</span>';666$data['csstidy']['predefined_templates']['highest_compression'][] = '<span class="selector">';667$data['csstidy']['predefined_templates']['highest_compression'][] = '</span><span class="format">{</span>';668$data['csstidy']['predefined_templates']['highest_compression'][] = '<span class="property">';669$data['csstidy']['predefined_templates']['highest_compression'][] = '</span><span class="value">';670$data['csstidy']['predefined_templates']['highest_compression'][] = '</span><span class="format">;</span>';671$data['csstidy']['predefined_templates']['highest_compression'][] = '<span class="format">}</span>';672$data['csstidy']['predefined_templates']['highest_compression'][] = '';673$data['csstidy']['predefined_templates']['highest_compression'][] = '<span class="format">}</span>';674$data['csstidy']['predefined_templates']['highest_compression'][] = '';675$data['csstidy']['predefined_templates']['highest_compression'][] = '<span class="comment">'; // before comment676$data['csstidy']['predefined_templates']['highest_compression'][] = '</span>'; // after comment677$data['csstidy']['predefined_templates']['highest_compression'][] = '';678$data['csstidy']['predefined_templates']['low_compression'][] = '<span class="at">';679$data['csstidy']['predefined_templates']['low_compression'][] = '</span> <span class="format">{</span>' . "\n";680$data['csstidy']['predefined_templates']['low_compression'][] = '<span class="selector">';681$data['csstidy']['predefined_templates']['low_compression'][] = '</span>' . "\n" . '<span class="format">{</span>' . "\n";682$data['csstidy']['predefined_templates']['low_compression'][] = ' <span class="property">';683$data['csstidy']['predefined_templates']['low_compression'][] = '</span><span class="value">';684$data['csstidy']['predefined_templates']['low_compression'][] = '</span><span class="format">;</span>' . "\n";685$data['csstidy']['predefined_templates']['low_compression'][] = '<span class="format">}</span>';686$data['csstidy']['predefined_templates']['low_compression'][] = "\n\n";687$data['csstidy']['predefined_templates']['low_compression'][] = "\n" . '<span class="format">}</span>' . "\n\n";688$data['csstidy']['predefined_templates']['low_compression'][] = ' ';689$data['csstidy']['predefined_templates']['low_compression'][] = '<span class="comment">'; // before comment690$data['csstidy']['predefined_templates']['low_compression'][] = '</span>' . "\n"; // after comment691$data['csstidy']['predefined_templates']['low_compression'][] = "\n";692// Add TablePress specific modifications.693require dirname( __FILE__ ) . '/data-tp.inc.php';...

Full Screen

Full Screen

DataTest.php

Source:DataTest.php Github

copy

Full Screen

1<?php2/*3 * This file is a part of dflydev/dot-access-data.4 *5 * (c) Dragonfly Development Inc.6 *7 * For the full copyright and license information, please view the LICENSE8 * file that was distributed with this source code.9 */10namespace Dflydev\DotAccessData;11class DataTest extends \PHPUnit_Framework_TestCase12{13 protected function getSampleData()14 {15 return array(16 'a' => 'A',17 'b' => array(18 'b' => 'B',19 'c' => array('C1', 'C2', 'C3'),20 'd' => array(21 'd1' => 'D1',22 'd2' => 'D2',23 'd3' => 'D3',24 ),25 ),26 'c' => array('c1', 'c2', 'c3'),27 'f' => array(28 'g' => array(29 'h' => 'FGH',30 ),31 ),32 'h' => array(33 'i' => 'I',34 ),35 'i' => array(36 'j' => 'J',37 ),38 );39 }40 protected function runSampleDataTests(DataInterface $data)41 {42 $this->assertEquals('A', $data->get('a'));43 $this->assertEquals('B', $data->get('b.b'));44 $this->assertEquals(array('C1', 'C2', 'C3'), $data->get('b.c'));45 $this->assertEquals('D3', $data->get('b.d.d3'));46 $this->assertEquals(array('c1', 'c2', 'c3'), $data->get('c'));47 $this->assertNull($data->get('foo'), 'Foo should not exist');48 $this->assertNull($data->get('f.g.h.i'));49 $this->assertEquals($data->get('foo', 'default-value-1'), 'default-value-1', 'Return default value');50 $this->assertEquals($data->get('f.g.h.i', 'default-value-2'), 'default-value-2');51 }52 public function testAppend()53 {54 $data = new Data($this->getSampleData());55 $data->append('a', 'B');56 $data->append('c', 'c4');57 $data->append('b.c', 'C4');58 $data->append('b.d.d3', 'D3b');59 $data->append('b.d.d4', 'D');60 $data->append('e', 'E');61 $data->append('f.a', 'b');62 $data->append('h.i', 'I2');63 $data->append('i.k.l', 'L');64 $this->assertEquals(array('A', 'B'), $data->get('a'));65 $this->assertEquals(array('c1', 'c2', 'c3', 'c4'), $data->get('c'));66 $this->assertEquals(array('C1', 'C2', 'C3', 'C4'), $data->get('b.c'));67 $this->assertEquals(array('D3', 'D3b'), $data->get('b.d.d3'));68 $this->assertEquals(array('D'), $data->get('b.d.d4'));69 $this->assertEquals(array('E'), $data->get('e'));70 $this->assertEquals(array('b'), $data->get('f.a'));71 $this->assertEquals(array('I', 'I2'), $data->get('h.i'));72 $this->assertEquals(array('L'), $data->get('i.k.l'));73 $this->setExpectedException('RuntimeException');74 $data->append('', 'broken');75 }76 public function testSet()77 {78 $data = new Data;79 $this->assertNull($data->get('a'));80 $this->assertNull($data->get('b.c'));81 $this->assertNull($data->get('d.e'));82 $data->set('a', 'A');83 $data->set('b.c', 'C');84 $data->set('d.e', array('f' => 'F', 'g' => 'G',));85 $this->assertEquals('A', $data->get('a'));86 $this->assertEquals(array('c' => 'C'), $data->get('b'));87 $this->assertEquals('C', $data->get('b.c'));88 $this->assertEquals('F', $data->get('d.e.f'));89 $this->assertEquals(array('e' => array('f' => 'F', 'g' => 'G',)), $data->get('d'));90 $this->setExpectedException('RuntimeException');91 $data->set('', 'broken');92 }93 public function testSetClobberStringInPath()94 {95 $data = new Data;96 $data->set('a.b.c', 'Should not be able to write to a.b.c.d.e');97 $this->setExpectedException('RuntimeException');98 $data->set('a.b.c.d.e', 'broken');99 }100 public function testRemove()101 {102 $data = new Data($this->getSampleData());103 $data->remove('a');104 $data->remove('b.c');105 $data->remove('b.d.d3');106 $data->remove('d');107 $data->remove('d.e.f');108 $data->remove('empty.path');109 $this->assertNull($data->get('a'));110 $this->assertNull($data->get('b.c'));111 $this->assertNull($data->get('b.d.d3'));112 $this->assertNull(null);113 $this->assertEquals('D2', $data->get('b.d.d2'));114 $this->setExpectedException('RuntimeException');115 $data->remove('', 'broken');116 }117 public function testGet()118 {119 $data = new Data($this->getSampleData());120 $this->runSampleDataTests($data);121 }122 public function testHas()123 {124 $data = new Data($this->getSampleData());125 foreach (126 array('a', 'i', 'b.d', 'f.g.h', 'h.i', 'b.d.d1') as $existentKey127 ) {128 $this->assertTrue($data->has($existentKey));129 }130 foreach (131 array('p', 'b.b1', 'b.c.C1', 'h.i.I', 'b.d.d1.D1') as $notExistentKey132 ) {133 $this->assertFalse($data->has($notExistentKey));134 }135 }136 public function testGetData()137 {138 $wrappedData = new Data(array(139 'wrapped' => array(140 'sampleData' => $this->getSampleData()141 ),142 ));143 $data = $wrappedData->getData('wrapped.sampleData');144 $this->runSampleDataTests($data);145 $this->setExpectedException('RuntimeException');146 $data = $wrappedData->getData('wrapped.sampleData.a');147 }148 public function testImport()149 {150 $data = new Data();151 $data->import($this->getSampleData());152 $this->runSampleDataTests($data);153 }154 public function testImportData()155 {156 $data = new Data();157 $data->importData(new Data($this->getSampleData()));158 $this->runSampleDataTests($data);159 }160 public function testExport()161 {162 $data = new Data($this->getSampleData());163 $this->assertEquals($this->getSampleData(), $data->export());164 }165}...

Full Screen

Full Screen

data

Using AI Code Generation

copy

Full Screen

1use Atoum\Atoum;2use Atoum\Atoum\Asserters;3use Atoum\Atoum\Reports;4use Atoum\Atoum\Reports\Realtime;5use Atoum\Atoum\Reports\Realtime\cli;6use Atoum\Atoum\Reports\Realtime\cli\progressBar;7use Atoum\Atoum\Reports\Realtime\cli\progressBar\cliColorizer;8use Atoum\Atoum\Reports\Realtime\cli\progressBar\cliColorizer\color;9use Atoum\Atoum\Reports\Realtime\cli\progressBar\cliColorizer\style;10use Atoum\Atoum\Reports\Realtime\cli\progressBar\cliColorizer\style\bold;11use Atoum\Atoum\Reports\Realtime\cli\progressBar\cliColorizer\style\foreground;12use Atoum\Atoum\Reports\Realtime\cli\progressBar\cliColorizer\style\background;13use Atoum\Atoum\Reports\Realtime\cli\progressBar\cliColorizer\style\decorator;14use Atoum\Atoum\Reports\Realtime\cli\progressBar\cliColorizer\style\decorator\blink;15use Atoum\Atoum\Reports\Realtime\cli\progressBar\cliColorizer\style\decorator\conceal;16use Atoum\Atoum\Reports\Realtime\cli\progressBar\cliColorizer\style\decorator\crossedOut;17use Atoum\Atoum\Reports\Realtime\cli\progressBar\cliColorizer\style\decorator\doubleUnderline;18use Atoum\Atoum\Reports\Realtime\cli\progressBar\cliColorizer\style\decorator\framed;19use Atoum\Atoum\Reports\Realtime\cli\progressBar\cliColorizer\style\decorator\highlight;20use Atoum\Atoum\Reports\Realtime\cli\progressBar\cliColorizer\style\decorator\overlined;

Full Screen

Full Screen

data

Using AI Code Generation

copy

Full Screen

1$object = new Atoum\test();2$object->method();3$object = new Atoum\test();4$object->method();5$object = new Atoum\test();6$object->method();7$object = new Atoum\test();8$object->method();9$object = new Atoum\test();10$object->method();11$object = new Atoum\test();12$object->method();13$object = new Atoum\test();14$object->method();15$object = new Atoum\test();16$object->method();17$object = new Atoum\test();18$object->method();19$object = new Atoum\test();20$object->method();21$object = new Atoum\test();22$object->method();23$object = new Atoum\test();24$object->method();25$object = new Atoum\test();26$object->method();27$object = new Atoum\test();28$object->method();