home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lifeos2.zip / LIFE-1.02 / TESTS / IN / TESTPROF.IN < prev    next >
Text File  |  1996-06-04  |  954b  |  109 lines

  1.  
  2.  
  3. %%%
  4. %%%  Test session for module 'profiler'.
  5. %%%
  6.  
  7.  
  8. profile(verif, app, testapp, f, g, h, level=>goal)?
  9.  
  10.  
  11. %%% Testing predicates
  12. %%% ------------------
  13.  
  14. testapp?
  15.  
  16. write_stats(app, testapp)?
  17.  
  18. app(A, B, [1,2,3])?
  19. ;
  20. ;
  21. ;
  22. ;
  23.  
  24. app(1)?
  25.  
  26. write_stats(app)?
  27.  
  28. clear_stats?
  29.  
  30. verif(true)?
  31.  
  32. verif(false)?
  33.  
  34. write_stats(verif, verbosity=>verbose)?
  35.  
  36.  
  37. %%% Testing functions
  38. %%% -----------------
  39.  
  40. X = f(2)?
  41.  
  42. X = f("rien")?
  43.  
  44. X = f(1.324)?
  45.  
  46. X = g("something")?
  47.  
  48. X = g(0)?
  49.  
  50. X = g(1)?
  51.  
  52. X = g(3.2)?
  53.  
  54. write_stats(f, g)?
  55.  
  56. X = h(3)?
  57.  
  58. X = h("rien")?
  59.  
  60. X = h(1.5)?
  61.  
  62. write_stats(f, g, h)?
  63.  
  64.  
  65. %%% Testing handling of explicit failures
  66. %%% -------------------------------------
  67.  
  68. profile(app, level=>clause)?
  69.  
  70. app(1.5)?
  71.  
  72. app([1,2], [3], A)?
  73.  
  74. write_stats(app)?
  75.  
  76.  
  77. %%% Testing cut
  78. %%% -----------
  79.  
  80. profile(q, level=>clause)?
  81.  
  82. q?
  83. ;
  84. ;
  85.  
  86. write_stats(q)?
  87.  
  88. clear_stats(q)?
  89.  
  90. write_stats(q, verbosity=>verbose)?
  91.  
  92. q?
  93. ;
  94. ;
  95.  
  96. write_stats(q, verbosity=>verbose)?
  97.  
  98. %%%
  99. %%%  End of test session
  100. %%%
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.