home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / stlpt453.zip / STLport-4.5.3 / test / regression / stl_test.cpp < prev    next >
C/C++ Source or Header  |  2000-12-07  |  14KB  |  495 lines

  1. // STLport regression testsuite component.
  2. // To compile as a separate example, please #define MAIN.
  3. #define  __DECLARE_GLOBALS_HERE
  4. #define  __PUT_STATIC_DATA_MEMBERS_HERE
  5. #include "stl.h"
  6. #include <iostream>
  7. #include "stl_test.h"
  8.  
  9.  
  10. #if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
  11. using namespace std;
  12. #endif
  13.  
  14. int main(int argc, char** argv) {
  15.     int iter_count = ( argc>1 ? 10000 : 1);
  16.     for (; iter_count; iter_count--) {
  17.         accum1_test(argc, argv);
  18.         cout.flush();
  19.         accum2_test(argc, argv);
  20.         cout.flush();
  21.         adjdiff0_test(argc, argv);
  22.         cout.flush();
  23.         adjdiff1_test(argc, argv);
  24.         cout.flush();
  25.         adjdiff2_test(argc, argv);
  26.         cout.flush();
  27.         adjfind0_test(argc, argv);
  28.         cout.flush();
  29.         adjfind1_test(argc, argv);
  30.         cout.flush();
  31.         adjfind2_test(argc, argv);
  32.         cout.flush();
  33.         advance_test(argc, argv);
  34.         cout.flush();
  35.         alg1_test(argc, argv);
  36.         cout.flush();
  37.         alg2_test(argc, argv);
  38.         cout.flush();
  39.         alg3_test(argc, argv);
  40.         cout.flush();
  41.         alg4_test(argc, argv);
  42.         cout.flush();
  43.         alg5_test(argc, argv);
  44.         cout.flush();
  45.         bcompos1_test(argc, argv);
  46.         cout.flush();
  47.         bcompos2_test(argc, argv);
  48.         cout.flush();
  49.         bind1st1_test(argc, argv);
  50.         cout.flush();
  51.         bind1st2_test(argc, argv);
  52.         cout.flush();
  53.         bind2nd1_test(argc, argv);
  54.         cout.flush();
  55.         bind2nd2_test(argc, argv);
  56.         cout.flush();
  57.         binsert1_test(argc, argv);
  58.         cout.flush();
  59.         binsert2_test(argc, argv);
  60.         cout.flush();
  61.         binsrch1_test(argc, argv);
  62.         cout.flush();
  63.         binsrch2_test(argc, argv);
  64.         cout.flush();
  65.         bnegate1_test(argc, argv);
  66.         cout.flush();
  67.         bnegate2_test(argc, argv);
  68.         cout.flush();
  69.     bvec1_test(argc, argv);
  70.         cout.flush();
  71.         copy1_test(argc, argv);
  72.         cout.flush();
  73.         copy2_test(argc, argv);
  74.         cout.flush();
  75.         copy3_test(argc, argv);
  76.         cout.flush();
  77.         copy4_test(argc, argv);
  78.         cout.flush();
  79.         copyb_test(argc, argv);
  80.         cout.flush();
  81.         copyb0_test(argc, argv);
  82.         cout.flush();
  83.         count0_test(argc, argv);
  84.         cout.flush();
  85.         count1_test(argc, argv);
  86.         cout.flush();
  87.         countif1_test(argc, argv);
  88.         cout.flush();
  89.         deque1_test(argc, argv);
  90.         cout.flush();
  91.         divides_test(argc, argv);
  92.         cout.flush();
  93.         eqlrnge0_test(argc, argv);
  94.         cout.flush();
  95.         eqlrnge1_test(argc, argv);
  96.         cout.flush();
  97.         eqlrnge2_test(argc, argv);
  98.         cout.flush();
  99.         equal0_test(argc, argv);
  100.         cout.flush();
  101.         equal1_test(argc, argv);
  102.         cout.flush();
  103.         equal2_test(argc, argv);
  104.         cout.flush();
  105.         equalto_test(argc, argv);
  106.         cout.flush();
  107.         fill1_test(argc, argv);
  108.         cout.flush();
  109.         filln1_test(argc, argv);
  110.         cout.flush();
  111.         find0_test(argc, argv);
  112.         cout.flush();
  113.         find1_test(argc, argv);
  114.         cout.flush();
  115.         findif0_test(argc, argv);
  116.         cout.flush();
  117.         findif1_test(argc, argv);
  118.         cout.flush();
  119.         finsert1_test(argc, argv);
  120.         cout.flush();
  121.         finsert2_test(argc, argv);
  122.         cout.flush();
  123.         foreach0_test(argc, argv);
  124.         cout.flush();
  125.         foreach1_test(argc, argv);
  126.         cout.flush();
  127.         func1_test(argc, argv);
  128.         cout.flush();
  129.         func2_test(argc, argv);
  130.         cout.flush();
  131.         func3_test(argc, argv);
  132.         cout.flush();
  133.         gener1_test(argc, argv);
  134.         cout.flush();
  135.         gener2_test(argc, argv);
  136.         cout.flush();
  137.         genern1_test(argc, argv);
  138.         cout.flush();
  139.         genern2_test(argc, argv);
  140.         cout.flush();
  141.         greateq_test(argc, argv);
  142.         cout.flush();
  143.         greater_test(argc, argv);
  144.         cout.flush();
  145.         incl0_test(argc, argv);
  146.         cout.flush();
  147.         incl1_test(argc, argv);
  148.         cout.flush();
  149.         incl2_test(argc, argv);
  150.         cout.flush();
  151.         inplmrg1_test(argc, argv);
  152.         cout.flush();
  153.         inplmrg2_test(argc, argv);
  154.         cout.flush();
  155.         inrprod0_test(argc, argv);
  156.         cout.flush();
  157.         inrprod1_test(argc, argv);
  158.         cout.flush();
  159.         inrprod2_test(argc, argv);
  160.         cout.flush();
  161.         insert1_test(argc, argv);
  162.         cout.flush();
  163.         insert2_test(argc, argv);
  164.         cout.flush();
  165.         iota1_test(argc, argv);
  166.         cout.flush();
  167.         istmit1_test(argc, argv);
  168.         cout.flush();
  169.         iter1_test(argc, argv);
  170.         cout.flush();
  171.         iter2_test(argc, argv);
  172.         cout.flush();
  173. #if ! (defined(__SUNPRO_CC) && (__SUNPRO_CC<=0x401))
  174.         iter3_test(argc, argv);
  175.         cout.flush();
  176. #endif
  177.         iter4_test(argc, argv);
  178.         cout.flush();
  179.         iterswp0_test(argc, argv);
  180.         cout.flush();
  181.         iterswp1_test(argc, argv);
  182.         cout.flush();
  183.         less_test(argc, argv);
  184.         cout.flush();
  185.         lesseq_test(argc, argv);
  186.         cout.flush();
  187.         lexcmp1_test(argc, argv);
  188.         cout.flush();
  189.         lexcmp2_test(argc, argv);
  190.         cout.flush();
  191.         list1_test(argc, argv);
  192.         cout.flush();
  193.         list2_test(argc, argv);
  194.         cout.flush();
  195.         list3_test(argc, argv);
  196.         cout.flush();
  197.         list4_test(argc, argv);
  198.         cout.flush();
  199.         logicand_test(argc, argv);
  200.         cout.flush();
  201.         logicnot_test(argc, argv);
  202.         cout.flush();
  203.         logicor_test(argc, argv);
  204.         cout.flush();
  205.         lwrbnd1_test(argc, argv);
  206.         cout.flush();
  207.         lwrbnd2_test(argc, argv);
  208.         cout.flush();
  209.         map1_test(argc, argv);
  210.         cout.flush();
  211.         max1_test(argc, argv);
  212.         cout.flush();
  213.         max2_test(argc, argv);
  214.         cout.flush();
  215.         maxelem1_test(argc, argv);
  216.         cout.flush();
  217.         maxelem2_test(argc, argv);
  218.         cout.flush();
  219.         merge0_test(argc, argv);
  220.         cout.flush();
  221.         merge1_test(argc, argv);
  222.         cout.flush();
  223.         merge2_test(argc, argv);
  224.         cout.flush();
  225.         min1_test(argc, argv);
  226.         cout.flush();
  227.         min2_test(argc, argv);
  228.         cout.flush();
  229.         minelem1_test(argc, argv);
  230.         cout.flush();
  231.         minelem2_test(argc, argv);
  232.         cout.flush();
  233.         minus_test(argc, argv);
  234.         cout.flush();
  235.         mismtch0_test(argc, argv);
  236.         cout.flush();
  237.         mismtch1_test(argc, argv);
  238.         cout.flush();
  239.         mismtch2_test(argc, argv);
  240.         cout.flush();
  241.         mkheap0_test(argc, argv);
  242.         cout.flush();
  243.         mkheap1_test(argc, argv);
  244.         cout.flush();
  245.         mmap1_test(argc, argv);
  246.         cout.flush();
  247.         mmap2_test(argc, argv);
  248.         cout.flush();
  249.         modulus_test(argc, argv);
  250.         cout.flush();
  251.         mset1_test(argc, argv);
  252.         cout.flush();
  253.         mset3_test(argc, argv);
  254.         cout.flush();
  255.         mset4_test(argc, argv);
  256.         cout.flush();
  257.         mset5_test(argc, argv);
  258.         cout.flush();
  259.         negate_test(argc, argv);
  260.         cout.flush();
  261.         nequal_test(argc, argv);
  262.         cout.flush();
  263.         nextprm0_test(argc, argv);
  264.         cout.flush();
  265.         nextprm1_test(argc, argv);
  266.         cout.flush();
  267.         nextprm2_test(argc, argv);
  268. #if ! (defined(__SUNPRO_CC) && (__SUNPRO_CC<=0x410))
  269.         nthelem0_test(argc, argv);
  270.         cout.flush();
  271.         nthelem1_test(argc, argv);
  272.         cout.flush();
  273.         nthelem2_test(argc, argv);
  274.         cout.flush();
  275. #endif
  276.         ostmit_test(argc, argv);
  277.         cout.flush();
  278.         pair0_test(argc, argv);
  279.         cout.flush();
  280.         pair1_test(argc, argv);
  281.         cout.flush();
  282.         pair2_test(argc, argv);
  283.         cout.flush();
  284.         parsrt0_test(argc, argv);
  285.         cout.flush();
  286.         parsrt1_test(argc, argv);
  287.         cout.flush();
  288.         parsrt2_test(argc, argv);
  289.         cout.flush();
  290.         parsrtc0_test(argc, argv);
  291.         cout.flush();
  292.         parsrtc1_test(argc, argv);
  293.         cout.flush();
  294.         parsrtc2_test(argc, argv);
  295.         cout.flush();
  296.         partsrt0_test(argc, argv);
  297.         cout.flush();
  298.         partsum0_test(argc, argv);
  299.         cout.flush();
  300.         partsum1_test(argc, argv);
  301.         cout.flush();
  302.         partsum2_test(argc, argv);
  303.         cout.flush();
  304.         pheap1_test(argc, argv);
  305.         cout.flush();
  306.         pheap2_test(argc, argv);
  307.         cout.flush();
  308.         plus_test(argc, argv);
  309.         cout.flush();
  310.         pqueue1_test(argc, argv);
  311.         cout.flush();
  312.         prevprm0_test(argc, argv);
  313.         cout.flush();
  314.         prevprm1_test(argc, argv);
  315.         cout.flush();
  316.         prevprm2_test(argc, argv);
  317.         cout.flush();
  318.         ptition0_test(argc, argv);
  319.         cout.flush();
  320.         ptition1_test(argc, argv);
  321.         cout.flush();
  322.         ptrbinf1_test(argc, argv);
  323.         cout.flush();
  324.         ptrbinf2_test(argc, argv);
  325.         cout.flush();
  326.         ptrunf1_test(argc, argv);
  327.         cout.flush();
  328.         ptrunf2_test(argc, argv);
  329.         cout.flush();
  330.         queue1_test(argc, argv);
  331.         cout.flush();
  332.         rawiter_test(argc, argv);
  333.         cout.flush();
  334.         remcopy1_test(argc, argv);
  335.         cout.flush();
  336.         remcpif1_test(argc, argv);
  337.         cout.flush();
  338.         remif1_test(argc, argv);
  339.         cout.flush();
  340.         remove1_test(argc, argv);
  341.         cout.flush();
  342.         repcpif1_test(argc, argv);
  343.         cout.flush();
  344.         replace0_test(argc, argv);
  345.         cout.flush();
  346.         replace1_test(argc, argv);
  347.         cout.flush();
  348.         replcpy1_test(argc, argv);
  349.         cout.flush();
  350.         replif1_test(argc, argv);
  351.         cout.flush();
  352. #if ! (defined(__SUNPRO_CC) && (__SUNPRO_CC<0x410))
  353.         revbit1_test(argc, argv);
  354.         cout.flush();
  355.         revbit2_test(argc, argv);
  356.         cout.flush();
  357. #endif
  358.         revcopy1_test(argc, argv);
  359.         cout.flush();
  360.         reverse1_test(argc, argv);
  361.         cout.flush();
  362. #if ! (defined(__SUNPRO_CC) && (__SUNPRO_CC<0x410))
  363.         reviter1_test(argc, argv);
  364.         cout.flush();
  365.         reviter2_test(argc, argv);
  366.         cout.flush();
  367. #endif
  368.         rndshuf0_test(argc, argv);
  369.         cout.flush();
  370.         rndshuf1_test(argc, argv);
  371.         cout.flush();
  372.         rndshuf2_test(argc, argv);
  373.         cout.flush();
  374.         rotate0_test(argc, argv);
  375.         cout.flush();
  376.         rotate1_test(argc, argv);
  377.         cout.flush();
  378.         rotcopy0_test(argc, argv);
  379.         cout.flush();
  380.         rotcopy1_test(argc, argv);
  381.         cout.flush();
  382.         search0_test(argc, argv);
  383.         cout.flush();
  384.         search1_test(argc, argv);
  385.         cout.flush();
  386.         search2_test(argc, argv);
  387.         cout.flush();
  388.         set1_test(argc, argv);
  389.         cout.flush();
  390.         set2_test(argc, argv);
  391.         cout.flush();
  392.         setdiff0_test(argc, argv);
  393.         cout.flush();
  394.         setdiff1_test(argc, argv);
  395.         cout.flush();
  396.         setdiff2_test(argc, argv);
  397.         cout.flush();
  398.         setintr0_test(argc, argv);
  399.         cout.flush();
  400.         setintr1_test(argc, argv);
  401.         cout.flush();
  402.         setintr2_test(argc, argv);
  403.         cout.flush();
  404.         setsymd0_test(argc, argv);
  405.         cout.flush();
  406.         setsymd1_test(argc, argv);
  407.         cout.flush();
  408.         setsymd2_test(argc, argv);
  409.         cout.flush();
  410.         setunon0_test(argc, argv);
  411.         cout.flush();
  412.         setunon1_test(argc, argv);
  413.         cout.flush();
  414.         setunon2_test(argc, argv);
  415.         cout.flush();
  416.         sort1_test(argc, argv);
  417.         cout.flush();
  418.         sort2_test(argc, argv);
  419.         cout.flush();
  420.         stack1_test(argc, argv);
  421.         cout.flush();
  422.         stack2_test(argc, argv);
  423.         cout.flush();
  424.         stblptn0_test(argc, argv);
  425.         cout.flush();
  426.         stblptn1_test(argc, argv);
  427.         cout.flush();
  428.         stblsrt1_test(argc, argv);
  429.         cout.flush();
  430.         stblsrt2_test(argc, argv);
  431.         cout.flush();
  432.         swap1_test(argc, argv);
  433.         cout.flush();
  434.         swprnge1_test(argc, argv);
  435.         cout.flush();
  436.         times_test(argc, argv);
  437.         cout.flush();
  438.         trnsfrm1_test(argc, argv);
  439.         cout.flush();
  440.         trnsfrm2_test(argc, argv);
  441.         cout.flush();
  442.         ucompos1_test(argc, argv);
  443.         cout.flush();
  444.         ucompos2_test(argc, argv);
  445.         cout.flush();
  446.         unegate1_test(argc, argv);
  447.         cout.flush();
  448.         unegate2_test(argc, argv);
  449.         cout.flush();
  450.         uniqcpy1_test(argc, argv);
  451.         cout.flush();
  452.         uniqcpy2_test(argc, argv);
  453.         cout.flush();
  454.         unique1_test(argc, argv);
  455.         cout.flush();
  456.         unique2_test(argc, argv);
  457.         cout.flush();
  458.         uprbnd1_test(argc, argv);
  459.         cout.flush();
  460.         uprbnd2_test(argc, argv);
  461.         cout.flush();
  462.         vec1_test(argc, argv);
  463.         cout.flush();
  464.         vec2_test(argc, argv);
  465.         cout.flush();
  466.         vec3_test(argc, argv);
  467.         cout.flush();
  468.         vec4_test(argc, argv);
  469.         cout.flush();
  470.         vec5_test(argc, argv);
  471.         cout.flush();
  472.         vec6_test(argc, argv);
  473.         cout.flush();
  474.         vec7_test(argc, argv);
  475.         cout.flush();
  476.         vec8_test(argc, argv);
  477.         cout.flush();
  478.         hmap1_test  ( argc, argv);
  479.         cout.flush();
  480.         hmmap1_test  ( argc, argv);
  481.         cout.flush();
  482.         hset2_test  ( argc, argv);
  483.         cout.flush();
  484.         hmset1_test  ( argc, argv);
  485.         cout.flush();
  486.         slist1_test (argc, argv);
  487.         cout.flush();
  488.         string1_test (argc, argv);
  489.         cout.flush();
  490.     bitset1_test (argc, argv); 
  491.         cout.flush();
  492.     }
  493.     return 0;
  494. }
  495.