taddset.pp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  1. {****************************************************************}
  2. { CODE GENERATOR TEST PROGRAM }
  3. {****************************************************************}
  4. { NODE TESTED : secondadd() }
  5. {****************************************************************}
  6. { PRE-REQUISITES: secondload() }
  7. { secondassign() }
  8. { secondsetelement() }
  9. {****************************************************************}
  10. { DEFINES: }
  11. { FPC = Target is FreePascal compiler }
  12. {****************************************************************}
  13. { REMARKS: }
  14. { }
  15. { }
  16. { }
  17. {****************************************************************}
  18. Program tneg;
  19. type
  20. { DO NOT CHANGE THE VALUES OF THESE ENUMERATIONS! }
  21. tsmallenum = (dA,dB,dC,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dop,dp,dq,dr);
  22. tasmop = (A_ABCD,
  23. A_ADD,A_ADDA,A_ADDI,A_ADDQ,A_ADDX,A_AND,A_ANDI,
  24. A_ASL,A_ASR,A_BCC,A_BCS,A_BEQ,A_BGE,A_BGT,A_BHI,
  25. A_BLE,A_BLS,A_BLT,A_BMI,A_BNE,A_BPL,A_BVC,A_BVS,
  26. A_BCHG,A_BCLR,A_BRA,A_BSET,A_BSR,A_BTST,A_CHK,
  27. A_CLR,A_CMP,A_CMPA,A_CMPI,A_CMPM,A_DBCC,A_DBCS,A_DBEQ,A_DBGE,
  28. A_DBGT,A_DBHI,A_DBLE,A_DBLS,A_DBLT,A_DBMI,A_DBNE,A_DBRA,
  29. A_DBPL,A_DBT,A_DBVC,A_DBVS,A_DBF,A_DIVS,A_DIVU,
  30. A_EOR,A_EORI,A_EXG,A_ILLEGAL,A_EXT,A_JMP,A_JSR,
  31. A_LEA,A_LINK,A_LSL,A_LSR,A_MOVE,A_MOVEA,A_MOVEI,A_MOVEQ,
  32. A_MOVEM,A_MOVEP,A_MULS,A_MULU,A_NBCD,A_NEG,A_NEGX,
  33. A_NOP,A_NOT,A_OR,A_ORI,A_PEA,A_ROL,A_ROR,A_ROXL,
  34. A_ROXR,A_RTR,A_RTS,A_SBCD,A_SCC,A_SCS,A_SEQ,A_SGE,
  35. A_SGT,A_SHI,A_SLE,A_SLS,A_SLT,A_SMI,A_SNE,
  36. A_SPL,A_ST,A_SVC,A_SVS,A_SF,A_SUB,A_SUBA,A_SUBI,A_SUBQ,
  37. A_SUBX,A_SWAP,A_TAS,A_TRAP,A_TRAPV,A_TST,A_UNLK,
  38. A_RTE,A_RESET,A_STOP,
  39. { MC68010 instructions }
  40. A_BKPT,A_MOVEC,A_MOVES,A_RTD,
  41. { MC68020 instructions }
  42. A_BFCHG,A_BFCLR,A_BFEXTS,A_BFEXTU,A_BFFFO,
  43. A_BFINS,A_BFSET,A_BFTST,A_CALLM,A_CAS,A_CAS2,
  44. A_CHK2,A_CMP2,A_DIVSL,A_DIVUL,A_EXTB,A_PACK,A_RTM,
  45. A_TRAPCC,A_TRACS,A_TRAPEQ,A_TRAPF,A_TRAPGE,A_TRAPGT,
  46. A_TRAPHI,A_TRAPLE,A_TRAPLS,A_TRAPLT,A_TRAPMI,A_TRAPNE,
  47. A_TRAPPL,A_TRAPT,A_TRAPVC,A_TRAPVS,A_UNPK,
  48. { FPU Processor instructions - directly supported only. }
  49. { IEEE aware and misc. condition codes not supported }
  50. A_FABS,A_FADD,
  51. A_FBEQ,A_FBNE,A_FBNGT,A_FBGT,A_FBGE,A_FBNGE,
  52. A_FBLT,A_FBNLT,A_FBLE,A_FBGL,A_FBNGL,A_FBGLE,A_FBNGLE,
  53. A_FDBEQ,A_FDBNE,A_FDBGT,A_FDBNGT,A_FDBGE,A_FDBNGE,
  54. A_FDBLT,A_FDBNLT,A_FDBLE,A_FDBGL,A_FDBNGL,A_FDBGLE,A_FBDNGLE,
  55. A_FSEQ,A_FSNE,A_FSGT,A_FSNGT,A_FSGE,A_FSNGE,
  56. A_FSLT,A_FSNLT,A_FSLE,A_FSGL,A_FSNGL,A_FSGLE,A_FSNGLE,
  57. A_FCMP,A_FDIV,A_FMOVE,A_FMOVEM,
  58. A_FMUL,A_FNEG,A_FNOP,A_FSQRT,A_FSUB,A_FSGLDIV,
  59. A_FSFLMUL,A_FTST,
  60. A_FTRAPEQ,A_FTRAPNE,A_FTRAPGT,A_FTRAPNGT,A_FTRAPGE,A_FTRAPNGE,
  61. A_FTRAPLT,A_FTRAPNLT,A_FTRAPLE,A_FTRAPGL,A_FTRAPNGL,A_FTRAPGLE,A_FTRAPNGLE,
  62. { Protected instructions }
  63. A_CPRESTORE,A_CPSAVE,
  64. { FPU Unit protected instructions }
  65. { and 68030/68851 common MMU instructions }
  66. { (this may include 68040 MMU instructions) }
  67. A_FRESTORE,A_FSAVE,A_PFLUSH,A_PFLUSHA,A_PLOAD,A_PMOVE,A_PTEST,
  68. { Useful for assembly langage output }
  69. A_LABEL,A_NONE);
  70. type
  71. topset = set of tasmop;
  72. tsmallset = set of tsmallenum;
  73. const
  74. { NORMAL SETS }
  75. constset1 : array[1..3] of topset =
  76. (
  77. { 66 } { 210 } { 225 }
  78. ([A_MOVE, { 66 : LONG 2 - BIT 2 }
  79. A_FTST, { 210 : LONG 6 - BIT 18 }
  80. A_CPSAVE]),{ 225 : LONG 7 - BIT 1 }
  81. { 1..8 }
  82. ([A_ADD..A_ASL]),
  83. { 134 }
  84. ([A_CHK2])
  85. );
  86. constset2 : array[1..3] of topset =
  87. (
  88. ([A_MOVE,A_FTST,A_CPSAVE]),
  89. ([A_ADD..A_ASL]),
  90. ([A_CHK2])
  91. );
  92. { SMALL SETS }
  93. constset3 : array[1..3] of tsmallset =
  94. (
  95. ([DA, { 0 : LONG 0 : bit 0 }
  96. DD, { 3 : LONG 0 : bit 3 }
  97. DM]), { 12 : LONG 0 : bit 12 }
  98. ([DB..DI]), { 1..8 : LONG 0 : bits 1-8 }
  99. ([DR]) { 17 : LONG 0 : bit 17 }
  100. );
  101. constset4 : array[1..3] of tsmallset =
  102. (
  103. ([DA,DD,DM]),
  104. ([DB..DI]),
  105. ([DR])
  106. );
  107. procedure SetTestEqual;
  108. { FPC_SET_COMP_SETS }
  109. var
  110. op2list :set of tasmop;
  111. oplist: set of tasmop;
  112. passed : boolean;
  113. Begin
  114. Write('Normal Set == Normal Set test...');
  115. passed := true;
  116. op2list:=[];
  117. oplist:=[];
  118. if not (oplist=op2list) then
  119. passed := false;
  120. if not (constset1[2] = constset2[2]) then
  121. passed := false;
  122. if (constset1[1] = constset2[2]) then
  123. passed := false;
  124. if not (constset1[1] = [A_MOVE,A_FTST,A_CPSAVE]) then
  125. passed := false;
  126. if passed then
  127. WriteLn('Success.')
  128. else
  129. WriteLn('Failure.');
  130. end;
  131. procedure SetTestNotEqual;
  132. { FPC_SET_COMP_SETS }
  133. var
  134. op2list :set of tasmop;
  135. oplist: set of tasmop;
  136. passed : boolean;
  137. Begin
  138. Write('Normal Set <> Normal Set test...');
  139. passed := true;
  140. op2list:=[];
  141. oplist:=[];
  142. if not (oplist=op2list) then
  143. passed := false;
  144. if (constset1[2] <> constset2[2]) then
  145. passed := false;
  146. if not (constset1[1] <> constset2[2]) then
  147. passed := false;
  148. { if ( [A_ADD] <> [A_ADD] ) then optimized out.
  149. passed := false;
  150. if ( [A_BLE..A_BPL] <> [A_BLE..A_BPL] ) then
  151. passed := false; }
  152. if (constset1[1] <> [A_MOVE,A_FTST,A_CPSAVE]) then
  153. passed := false;
  154. if passed then
  155. WriteLn('Success.')
  156. else
  157. WriteLn('Failure.');
  158. end;
  159. procedure SetTestLt;
  160. var
  161. op2list :set of tasmop;
  162. oplist: set of tasmop;
  163. passed : boolean;
  164. begin
  165. Write('Normal Set <= Normal Set test...');
  166. passed := true;
  167. if constset1[1] <= constset2[2] then
  168. passed := false;
  169. oplist := [];
  170. op2list := [A_MOVE];
  171. if op2list <= oplist then
  172. passed := false;
  173. oplist := [A_MOVE,A_CPRESTORE..A_CPSAVE];
  174. if oplist <= op2list then
  175. passed := false;
  176. if passed then
  177. WriteLn('Success.')
  178. else
  179. WriteLn('Failure.');
  180. end;
  181. Procedure SetTestAddOne;
  182. { FPC_SET_SET_BYTE }
  183. { FPC_SET_ADD_SETS }
  184. var
  185. op : tasmop;
  186. oplist: set of tasmop;
  187. Begin
  188. Write('Set + Set element testing...');
  189. op:=A_LABEL;
  190. oplist:=[];
  191. oplist:=oplist+[op];
  192. if oplist = [A_LABEL] then
  193. Begin
  194. WriteLn('Success.');
  195. end
  196. else
  197. Begin
  198. WriteLn('Failure.');
  199. end;
  200. end;
  201. Procedure SetTestAddTwo;
  202. { SET_ADD_SETS }
  203. var
  204. op2list :set of tasmop;
  205. oplist: set of tasmop;
  206. Begin
  207. Write('Complex Set + Set element testing...');
  208. op2list:=[];
  209. oplist:=[];
  210. oplist:=[A_MOVE]+[A_JSR];
  211. op2list:=[A_LABEL];
  212. oplist:=op2list+oplist;
  213. if oplist = [A_MOVE,A_JSR,A_LABEL] then
  214. Begin
  215. WriteLn('Success.');
  216. end
  217. else
  218. Begin
  219. WriteLn('Failure.');
  220. end;
  221. end;
  222. Procedure SetTestSubOne;
  223. { SET_SUB_SETS }
  224. var
  225. op2list :set of tasmop;
  226. oplist: set of tasmop;
  227. op :tasmop;
  228. passed : boolean;
  229. Begin
  230. Write('Set - Set element testing...');
  231. passed := true;
  232. op2list:=[];
  233. oplist:=[];
  234. op := A_TRACS;
  235. oplist:=[A_MOVE]+[A_JSR]+[op];
  236. op2list:=[A_MOVE]+[A_JSR];
  237. oplist:=oplist-op2list;
  238. if oplist <> [A_TRACS] then
  239. passed := false;
  240. oplist:=[A_MOVE]+[A_JSR]+[op];
  241. op2list:=[A_MOVE]+[A_JSR];
  242. oplist:=op2list-oplist;
  243. if oplist <> [] then
  244. passed := false;
  245. if passed then
  246. WriteLn('Success.')
  247. else
  248. WriteLn('Failure.');
  249. end;
  250. Procedure SetTestSubTwo;
  251. { FPC_SET_SUB_SETS }
  252. const
  253. b: tasmop = (A_BSR);
  254. var
  255. op2list :set of tasmop;
  256. oplist: set of tasmop;
  257. op : tasmop;
  258. passed : boolean;
  259. Begin
  260. Write('Complex Set - Set element testing...');
  261. op := A_BKPT;
  262. passed := true;
  263. oplist:=[A_MOVE]+[A_JSR]-[op];
  264. op2list:=[A_MOVE]+[A_JSR];
  265. if oplist <> op2list then
  266. passed := false;
  267. oplist := [A_MOVE];
  268. oplist := oplist - [A_MOVE];
  269. if oplist <> [] then
  270. passed := false;
  271. oplist := oplist + [b];
  272. if oplist <> [b] then
  273. passed := false;
  274. oplist := oplist - [b];
  275. if oplist <> [] then
  276. passed := false;
  277. if not passed then
  278. WriteLn('Failure.')
  279. else
  280. WriteLn('Success.');
  281. end;
  282. Procedure SetTestMulSets;
  283. { FPC_SET_MUL_SETS }
  284. var
  285. op2list :set of tasmop;
  286. oplist: set of tasmop;
  287. passed : boolean;
  288. Begin
  289. passed := true;
  290. Write('Set * Set element testing...');
  291. op2list:=[];
  292. oplist:=[];
  293. oplist:=[A_MOVE]+[A_JSR];
  294. op2list:=[A_MOVE];
  295. oplist:=oplist*op2list;
  296. if oplist <> [A_JSR] then
  297. passed := false;
  298. oplist := [A_MOVE,A_FTST];
  299. op2list := [A_MOVE,A_FTST];
  300. oplist := oplist * op2list;
  301. if oplist <> [A_MOVE,A_FTST] then
  302. passed := false;
  303. if passed then
  304. WriteLn('Success.')
  305. else
  306. WriteLn('Failure.');
  307. end;
  308. procedure SetTestRange;
  309. var
  310. op2list :set of tasmop;
  311. oplist: set of tasmop;
  312. passed : boolean;
  313. op1 : tasmop;
  314. op2 : tasmop;
  315. begin
  316. passed := true;
  317. Write('Range Set + element testing...');
  318. op1 := A_ADD;
  319. op2 := A_ASL;
  320. oplist := [];
  321. oplist := [op1..op2];
  322. if oplist <> constset1[2] then
  323. passed := false;
  324. if not passed then
  325. WriteLn('Failure,')
  326. else
  327. WriteLn('Success.');
  328. end;
  329. procedure SetTestByte;
  330. var
  331. op2list :set of tasmop;
  332. oplist: set of tasmop;
  333. passed : boolean;
  334. op1 : tasmop;
  335. op2 : tasmop;
  336. op : tasmop;
  337. begin
  338. Write('Simple Set + element testing...');
  339. passed := true;
  340. op := A_LABEL;
  341. oplist := [A_MOVE,op,A_JSR];
  342. if oplist <> [A_MOVE,A_LABEL,A_JSR] then
  343. passed := false;
  344. if not passed then
  345. WriteLn('Failure,')
  346. else
  347. WriteLn('Success.');
  348. end;
  349. {------------------------------ TESTS FOR SMALL VALUES ---------------------}
  350. procedure SmallSetTestEqual;
  351. var
  352. op2list :set of tsmallenum;
  353. oplist: set of tsmallenum;
  354. passed : boolean;
  355. Begin
  356. Write('Small Set == Small Set test...');
  357. passed := true;
  358. op2list:=[];
  359. oplist:=[];
  360. if not (oplist=op2list) then
  361. passed := false;
  362. if not (constset3[2] = constset4[2]) then
  363. passed := false;
  364. if (constset3[1] = constset4[2]) then
  365. passed := false;
  366. if not (constset3[1] = [DA,DD,DM]) then
  367. passed := false;
  368. if passed then
  369. WriteLn('Success.')
  370. else
  371. WriteLn('Failure.');
  372. end;
  373. procedure SmallSetTestNotEqual;
  374. var
  375. op2list :set of tsmallenum;
  376. oplist: set of tsmallenum;
  377. passed : boolean;
  378. Begin
  379. Write('Small Set <> Small Set test...');
  380. passed := true;
  381. op2list:=[];
  382. oplist:=[];
  383. if not (oplist=op2list) then
  384. passed := false;
  385. if (constset3[2] <> constset4[2]) then
  386. passed := false;
  387. if not (constset3[1] <> constset4[2]) then
  388. passed := false;
  389. { if ( [A_ADD] <> [A_ADD] ) then optimized out.
  390. passed := false;
  391. if ( [A_BLE..A_BPL] <> [A_BLE..A_BPL] ) then
  392. passed := false; }
  393. if (constset3[1] <> [DA,DD,DM]) then
  394. passed := false;
  395. if passed then
  396. WriteLn('Success.')
  397. else
  398. WriteLn('Failure.');
  399. end;
  400. procedure SmallSetTestLt;
  401. var
  402. op2list :set of tsmallenum;
  403. oplist: set of tsmallenum;
  404. passed : boolean;
  405. begin
  406. Write('Small Set <= Small Set test...');
  407. passed := true;
  408. if constset3[1] <= constset4[2] then
  409. passed := false;
  410. oplist := [];
  411. op2list := [DC];
  412. if op2list <= oplist then
  413. passed := false;
  414. oplist := [DC,DF..DM];
  415. if oplist <= op2list then
  416. passed := false;
  417. if passed then
  418. WriteLn('Success.')
  419. else
  420. WriteLn('Failure.');
  421. end;
  422. Procedure SmallSetTestAddOne;
  423. var
  424. op : tsmallenum;
  425. oplist: set of tsmallenum;
  426. Begin
  427. Write('Small Set + Small Set element testing...');
  428. op:=DG;
  429. oplist:=[];
  430. oplist:=oplist+[op];
  431. if oplist = [DG] then
  432. Begin
  433. WriteLn('Success.');
  434. end
  435. else
  436. Begin
  437. WriteLn('Failure.');
  438. end;
  439. end;
  440. Procedure SmallSetTestAddTwo;
  441. var
  442. op2list :set of tsmallenum;
  443. oplist: set of tsmallenum;
  444. Begin
  445. Write('Small Complex Set + Small Set element testing...');
  446. op2list:=[];
  447. oplist:=[];
  448. oplist:=[DG]+[DI];
  449. op2list:=[DM];
  450. oplist:=op2list+oplist;
  451. if oplist = [DG,DI,DM] then
  452. Begin
  453. WriteLn('Success.');
  454. end
  455. else
  456. Begin
  457. WriteLn('Failure.');
  458. end;
  459. end;
  460. Procedure SmallSetTestSubOne;
  461. var
  462. op2list :set of tsmallenum;
  463. oplist: set of tsmallenum;
  464. op :tsmallenum;
  465. passed : boolean;
  466. Begin
  467. Write('Small Set - Small Set element testing...');
  468. passed := true;
  469. op2list:=[];
  470. oplist:=[];
  471. op := DL;
  472. oplist:=[DG]+[DI]+[op];
  473. op2list:=[DG]+[DI];
  474. oplist:=oplist-op2list;
  475. if oplist <> [DL] then
  476. passed := false;
  477. oplist:=[DG]+[DI]+[op];
  478. op2list:=[DG]+[DI];
  479. oplist:=op2list-oplist;
  480. if oplist <> [] then
  481. passed := false;
  482. if passed then
  483. WriteLn('Success.')
  484. else
  485. WriteLn('Failure.');
  486. end;
  487. Procedure SmallSetTestSubTwo;
  488. const
  489. b: tsmallenum = (DH);
  490. var
  491. op2list :set of tsmallenum;
  492. oplist: set of tsmallenum;
  493. op : tsmallenum;
  494. passed : boolean;
  495. Begin
  496. Write('Small Complex Set - Small Set element testing...');
  497. op := DL;
  498. passed := true;
  499. oplist:=[DG]+[DI]-[op];
  500. op2list:=[DG]+[DI];
  501. if oplist <> op2list then
  502. passed := false;
  503. oplist := [DG];
  504. oplist := oplist - [DG];
  505. if oplist <> [] then
  506. passed := false;
  507. oplist := oplist + [b];
  508. if oplist <> [b] then
  509. passed := false;
  510. oplist := oplist - [b];
  511. if oplist <> [] then
  512. passed := false;
  513. if not passed then
  514. WriteLn('Failure.')
  515. else
  516. WriteLn('Success.');
  517. end;
  518. Procedure SmallSetTestMulSets;
  519. var
  520. op2list : set of tsmallenum;
  521. oplist: set of tsmallenum;
  522. passed : boolean;
  523. Begin
  524. passed := true;
  525. Write('Small Set * Small Set element testing...');
  526. op2list:=[];
  527. oplist:=[];
  528. oplist:=[DG]+[DI];
  529. op2list:=[DG];
  530. oplist:=oplist*op2list;
  531. if oplist <> [DI] then
  532. passed := false;
  533. oplist := [DG,DK];
  534. op2list := [DG,DK];
  535. oplist := oplist * op2list;
  536. if oplist <> [DG,DK] then
  537. passed := false;
  538. if passed then
  539. WriteLn('Success.')
  540. else
  541. WriteLn('Failure.');
  542. end;
  543. procedure SmallSetTestRange;
  544. var
  545. op2list :set of tsmallenum;
  546. oplist: set of tsmallenum;
  547. passed : boolean;
  548. op1 : tsmallenum;
  549. op2 : tsmallenum;
  550. begin
  551. passed := true;
  552. Write('Small Range Set + element testing...');
  553. op1 := DB;
  554. op2 := DI;
  555. oplist := [];
  556. oplist := [op1..op2];
  557. if oplist <> constset3[2] then
  558. passed := false;
  559. if not passed then
  560. WriteLn('Failure,')
  561. else
  562. WriteLn('Success.');
  563. end;
  564. procedure SmallSetTestByte;
  565. var
  566. op2list : set of tsmallenum;
  567. oplist: set of tsmallenum;
  568. passed : boolean;
  569. op1 : tsmallenum;
  570. op2 : tsmallenum;
  571. op : tsmallenum;
  572. begin
  573. Write('Small Simple Set + element testing...');
  574. passed := true;
  575. op := DD;
  576. oplist := [DG,op,DI];
  577. if oplist <> [DG,DD,DI] then
  578. passed := false;
  579. if not passed then
  580. WriteLn('Failure,')
  581. else
  582. WriteLn('Success.');
  583. end;
  584. (*
  585. const
  586. b: myenum = (dA);
  587. var
  588. enum: set of myenum;
  589. oplist: set of tasmop;
  590. l : word;
  591. Begin
  592. SetTestEqual;
  593. SetTestNotEqual;
  594. { small sets }
  595. enum:=[];
  596. { add }
  597. enum:=enum+[da];
  598. { subtract }
  599. enum:=enum-[da];
  600. if DA in enum then
  601. WriteLn('Found A_LABEL');
  602. { very large sets }
  603. { copy loop test }
  604. WRITELN('LARGE SETS:');
  605. oplist := [A_LABEL];
  606. { secondin test }
  607. if A_LABEL in oplist then
  608. WriteLn('TESTING SIMPLE SECOND_IN: PASSED.');
  609. { }
  610. oplist:=[];
  611. if A_LABEL in oplist then
  612. WriteLn('SECOND IN FAILED.');
  613. { SecondinSets;}
  614. SetSetByte;
  615. SetAddSets;
  616. SetSubSets;
  617. SetCompSets;
  618. SetMulSets;
  619. WRITELN('SMALL SETS:');
  620. SmallInSets;
  621. SmallAddSets;
  622. SmallSubSets;
  623. SmallCompSets;
  624. SmallMulSets;
  625. l:=word(A_CPRESTORE);
  626. if l = word(A_CPRESTORE) then
  627. Begin
  628. end;
  629. *)
  630. Begin
  631. WriteLn('----------------------- Normal sets -----------------------');
  632. { Normal sets }
  633. SetTestEqual;
  634. SetTestNotEqual;
  635. SetTestAddOne;
  636. SetTestAddTwo;
  637. SetTestSubOne;
  638. SetTestSubTwo;
  639. SetTestRange;
  640. SetTestLt;
  641. SetTestByte;
  642. { Small sets }
  643. WriteLn('----------------------- Small sets -----------------------');
  644. SmallSetTestEqual;
  645. SmallSetTestNotEqual;
  646. SmallSetTestAddOne;
  647. SmallSetTestAddTwo;
  648. SmallSetTestSubOne;
  649. SmallSetTestSubTwo;
  650. SmallSetTestRange;
  651. SmallSetTestLt;
  652. SmallSetTestByte;
  653. end.
  654. {
  655. $Log$
  656. Revision 1.3 2001-06-24 22:30:19 carl
  657. + completed small set tests
  658. Revision 1.2 2001/06/22 02:24:40 carl
  659. + complete normal set tests
  660. Revision 1.1 2001/06/21 02:50:44 carl
  661. cgadd node testing for sets (incomplete)
  662. }