Helios-Commands-SUnit.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. define("helios/Helios-Commands-SUnit", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_vm/globals", "helios/Helios-Commands-Tools"], function(smalltalk,nil,_st, globals){
  2. smalltalk.addPackage('Helios-Commands-SUnit');
  3. smalltalk.packages["Helios-Commands-SUnit"].transport = {"type":"amd","amdNamespace":"helios"};
  4. smalltalk.addClass('HLSUnitCommand', globals.HLToolCommand, [], 'Helios-Commands-SUnit');
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "isValidFor:",
  8. protocol: 'testing',
  9. fn: function (aModel){
  10. var self=this;
  11. function $HLSUnitModel(){return globals.HLSUnitModel||(typeof HLSUnitModel=="undefined"?nil:HLSUnitModel)}
  12. return smalltalk.withContext(function($ctx1) {
  13. var $1;
  14. $1=_st(aModel)._isKindOf_($HLSUnitModel());
  15. return $1;
  16. }, function($ctx1) {$ctx1.fill(self,"isValidFor:",{aModel:aModel},globals.HLSUnitCommand.klass)})},
  17. args: ["aModel"],
  18. source: "isValidFor: aModel\x0a\x09^ aModel isKindOf: HLSUnitModel",
  19. messageSends: ["isKindOf:"],
  20. referencedClasses: ["HLSUnitModel"]
  21. }),
  22. globals.HLSUnitCommand.klass);
  23. smalltalk.addClass('HLSUnitRunTests', globals.HLSUnitCommand, [], 'Helios-Commands-SUnit');
  24. smalltalk.addMethod(
  25. smalltalk.method({
  26. selector: "execute",
  27. protocol: 'executing',
  28. fn: function (){
  29. var self=this;
  30. return smalltalk.withContext(function($ctx1) {
  31. _st(self._model())._runTests();
  32. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},globals.HLSUnitRunTests)})},
  33. args: [],
  34. source: "execute\x0a\x09self model runTests",
  35. messageSends: ["runTests", "model"],
  36. referencedClasses: []
  37. }),
  38. globals.HLSUnitRunTests);
  39. smalltalk.addMethod(
  40. smalltalk.method({
  41. selector: "isActive",
  42. protocol: 'testing',
  43. fn: function (){
  44. var self=this;
  45. return true;
  46. },
  47. args: [],
  48. source: "isActive\x0a\x09^true",
  49. messageSends: [],
  50. referencedClasses: []
  51. }),
  52. globals.HLSUnitRunTests);
  53. smalltalk.addMethod(
  54. smalltalk.method({
  55. selector: "key",
  56. protocol: 'accessing',
  57. fn: function (){
  58. var self=this;
  59. return "r";
  60. },
  61. args: [],
  62. source: "key\x0a\x09^'r'",
  63. messageSends: [],
  64. referencedClasses: []
  65. }),
  66. globals.HLSUnitRunTests.klass);
  67. smalltalk.addMethod(
  68. smalltalk.method({
  69. selector: "label",
  70. protocol: 'accessing',
  71. fn: function (){
  72. var self=this;
  73. return "Run Tests";
  74. },
  75. args: [],
  76. source: "label\x0a\x09^'Run Tests'",
  77. messageSends: [],
  78. referencedClasses: []
  79. }),
  80. globals.HLSUnitRunTests.klass);
  81. smalltalk.addClass('HLSUnitSelectAllCommand', globals.HLSUnitCommand, [], 'Helios-Commands-SUnit');
  82. smalltalk.addMethod(
  83. smalltalk.method({
  84. selector: "key",
  85. protocol: 'accessing',
  86. fn: function (){
  87. var self=this;
  88. return "a";
  89. },
  90. args: [],
  91. source: "key\x0a\x09^ 'a'",
  92. messageSends: [],
  93. referencedClasses: []
  94. }),
  95. globals.HLSUnitSelectAllCommand.klass);
  96. smalltalk.addMethod(
  97. smalltalk.method({
  98. selector: "label",
  99. protocol: 'accessing',
  100. fn: function (){
  101. var self=this;
  102. return "Select all";
  103. },
  104. args: [],
  105. source: "label\x0a\x09^ 'Select all'",
  106. messageSends: [],
  107. referencedClasses: []
  108. }),
  109. globals.HLSUnitSelectAllCommand.klass);
  110. smalltalk.addClass('HLSUnitSelectAllPackagesCommand', globals.HLSUnitSelectAllCommand, [], 'Helios-Commands-SUnit');
  111. smalltalk.addMethod(
  112. smalltalk.method({
  113. selector: "category",
  114. protocol: 'accessing',
  115. fn: function (){
  116. var self=this;
  117. return "Packages";
  118. },
  119. args: [],
  120. source: "category\x0a\x09^'Packages'",
  121. messageSends: [],
  122. referencedClasses: []
  123. }),
  124. globals.HLSUnitSelectAllPackagesCommand);
  125. smalltalk.addMethod(
  126. smalltalk.method({
  127. selector: "execute",
  128. protocol: 'executing',
  129. fn: function (){
  130. var self=this;
  131. return smalltalk.withContext(function($ctx1) {
  132. _st(self._model())._selectAllPackages();
  133. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},globals.HLSUnitSelectAllPackagesCommand)})},
  134. args: [],
  135. source: "execute\x0a\x09self model selectAllPackages",
  136. messageSends: ["selectAllPackages", "model"],
  137. referencedClasses: []
  138. }),
  139. globals.HLSUnitSelectAllPackagesCommand);
  140. smalltalk.addMethod(
  141. smalltalk.method({
  142. selector: "isActive",
  143. protocol: 'testing',
  144. fn: function (){
  145. var self=this;
  146. return true;
  147. },
  148. args: [],
  149. source: "isActive\x0a\x09^true",
  150. messageSends: [],
  151. referencedClasses: []
  152. }),
  153. globals.HLSUnitSelectAllPackagesCommand);
  154. smalltalk.addMethod(
  155. smalltalk.method({
  156. selector: "key",
  157. protocol: 'accessing',
  158. fn: function (){
  159. var self=this;
  160. return "p";
  161. },
  162. args: [],
  163. source: "key\x0a\x09^ 'p'",
  164. messageSends: [],
  165. referencedClasses: []
  166. }),
  167. globals.HLSUnitSelectAllPackagesCommand.klass);
  168. smalltalk.addMethod(
  169. smalltalk.method({
  170. selector: "label",
  171. protocol: 'accessing',
  172. fn: function (){
  173. var self=this;
  174. return "Select all packages";
  175. },
  176. args: [],
  177. source: "label\x0a\x09^ 'Select all packages'",
  178. messageSends: [],
  179. referencedClasses: []
  180. }),
  181. globals.HLSUnitSelectAllPackagesCommand.klass);
  182. });