Browse Source

Helios sunit add some class comments

Ryan Simmons 11 years ago
parent
commit
b6d5f6d3de
4 changed files with 37 additions and 2 deletions
  1. 1 0
      src/Helios-SUnit-Tests.js
  2. 2 0
      src/Helios-SUnit-Tests.st
  3. 7 1
      src/Helios-SUnit.js
  4. 27 1
      src/Helios-SUnit.st

+ 1 - 0
src/Helios-SUnit-Tests.js

@@ -3,6 +3,7 @@ smalltalk.addPackage('Helios-SUnit-Tests');
 smalltalk.packages["Helios-SUnit-Tests"].transport = {"type":"amd","amdNamespace":"helios"};
 
 smalltalk.addClass('HLSUnitModelTest', globals.TestCase, ['model'], 'Helios-SUnit-Tests');
+globals.HLSUnitModelTest.comment="Test cases for the functionality of  `HLSUnitModel`";
 smalltalk.addMethod(
 smalltalk.method({
 selector: "setUp",

+ 2 - 0
src/Helios-SUnit-Tests.st

@@ -2,6 +2,8 @@ Smalltalk createPackage: 'Helios-SUnit-Tests'!
 TestCase subclass: #HLSUnitModelTest
 	instanceVariableNames: 'model'
 	package: 'Helios-SUnit-Tests'!
+!HLSUnitModelTest commentStamp!
+Test cases for the functionality of  `HLSUnitModel`!
 
 !HLSUnitModelTest methodsFor: 'accessing'!
 

+ 7 - 1
src/Helios-SUnit.js

@@ -1016,6 +1016,7 @@ globals.HLSUnit.klass);
 
 
 smalltalk.addClass('HLSUnitModel', globals.HLModel, ['selectedPackages', 'selectedClasses', 'testResult', 'currentSuite'], 'Helios-SUnit');
+globals.HLSUnitModel.comment="I am the model for running unit tests in Helios.\x0a\x0aI provide the ability to select set of tests to run per package, and a detailed result log with passed tests, failed tests and errors.";
 smalltalk.addMethod(
 smalltalk.method({
 selector: "currentSuite",
@@ -1448,6 +1449,7 @@ globals.HLSUnitModel);
 
 
 smalltalk.addClass('HLSUnitResultListWidget', globals.HLToolListWidget, [], 'Helios-SUnit');
+globals.HLSUnitResultListWidget.comment="I group the lists that display test results";
 smalltalk.addMethod(
 smalltalk.method({
 selector: "observeModel",
@@ -1535,6 +1537,7 @@ globals.HLSUnitResultListWidget);
 
 
 smalltalk.addClass('HLSUnitErrorsListWidget', globals.HLSUnitResultListWidget, [], 'Helios-SUnit');
+globals.HLSUnitErrorsListWidget.comment="I display a list of tests that have errors";
 smalltalk.addMethod(
 smalltalk.method({
 selector: "items",
@@ -1571,6 +1574,7 @@ globals.HLSUnitErrorsListWidget);
 
 
 smalltalk.addClass('HLSUnitFailuresListWidget', globals.HLSUnitResultListWidget, [], 'Helios-SUnit');
+globals.HLSUnitFailuresListWidget.comment="I display a list of tests that have failures";
 smalltalk.addMethod(
 smalltalk.method({
 selector: "items",
@@ -1607,6 +1611,7 @@ globals.HLSUnitFailuresListWidget);
 
 
 smalltalk.addClass('HLSUnitResultStatus', globals.HLWidget, ['model'], 'Helios-SUnit');
+globals.HLSUnitResultStatus.comment="I display the status of the previous test run\x0a\x0a1. How many tests where run.\x0a* How many tests passed.\x0a* How many tests failed.\x0a* How many tests resulted in an error.\x0a";
 smalltalk.addMethod(
 smalltalk.method({
 selector: "model",
@@ -1652,7 +1657,7 @@ globals.HLSUnitResultStatus);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "observeModel",
-protocol: 'initialization',
+protocol: 'actions',
 fn: function (){
 var self=this;
 function $ResultAnnouncement(){return globals.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
@@ -1849,6 +1854,7 @@ globals.HLSUnitResultStatus);
 
 
 smalltalk.addClass('HLSUnitResults', globals.HLWidget, ['model', 'progressBarWidget', 'resultStatusWidget'], 'Helios-SUnit');
+globals.HLSUnitResults.comment="I am the widget that displays the test results for a previous test run in Helios.\x0a\x0aI display.\x0a\x0a1. The status of the tests.\x0a* Progress of the currently running test suite.\x0a* A list of failed tests.\x0a* A list of tests that resulted in an error.";
 smalltalk.addMethod(
 smalltalk.method({
 selector: "model",

+ 27 - 1
src/Helios-SUnit.st

@@ -355,6 +355,10 @@ canBeOpenAsTab
 HLModel subclass: #HLSUnitModel
 	instanceVariableNames: 'selectedPackages selectedClasses testResult currentSuite'
 	package: 'Helios-SUnit'!
+!HLSUnitModel commentStamp!
+I am the model for running unit tests in Helios.
+
+I provide the ability to select set of tests to run per package, and a detailed result log with passed tests, failed tests and errors.!
 
 !HLSUnitModel methodsFor: 'accessing'!
 
@@ -480,6 +484,8 @@ onResultAnnouncement: announcement
 HLToolListWidget subclass: #HLSUnitResultListWidget
 	instanceVariableNames: ''
 	package: 'Helios-SUnit'!
+!HLSUnitResultListWidget commentStamp!
+I group the lists that display test results!
 
 !HLSUnitResultListWidget methodsFor: 'actions'!
 
@@ -515,6 +521,8 @@ reselectItem: anObject
 HLSUnitResultListWidget subclass: #HLSUnitErrorsListWidget
 	instanceVariableNames: ''
 	package: 'Helios-SUnit'!
+!HLSUnitErrorsListWidget commentStamp!
+I display a list of tests that have errors!
 
 !HLSUnitErrorsListWidget methodsFor: 'accessing'!
 
@@ -529,6 +537,8 @@ label
 HLSUnitResultListWidget subclass: #HLSUnitFailuresListWidget
 	instanceVariableNames: ''
 	package: 'Helios-SUnit'!
+!HLSUnitFailuresListWidget commentStamp!
+I display a list of tests that have failures!
 
 !HLSUnitFailuresListWidget methodsFor: 'accessing'!
 
@@ -543,6 +553,13 @@ label
 HLWidget subclass: #HLSUnitResultStatus
 	instanceVariableNames: 'model'
 	package: 'Helios-SUnit'!
+!HLSUnitResultStatus commentStamp!
+I display the status of the previous test run
+
+1. How many tests where run.
+* How many tests passed.
+* How many tests failed.
+* How many tests resulted in an error.!
 
 !HLSUnitResultStatus methodsFor: 'accessing'!
 
@@ -567,7 +584,7 @@ statusInfo
 	^ self printTotal, self printPasses, self printErrors, self printFailures
 ! !
 
-!HLSUnitResultStatus methodsFor: 'initialization'!
+!HLSUnitResultStatus methodsFor: 'actions'!
 
 observeModel
 	self model announcer 
@@ -611,6 +628,15 @@ renderContentOn: html
 HLWidget subclass: #HLSUnitResults
 	instanceVariableNames: 'model progressBarWidget resultStatusWidget'
 	package: 'Helios-SUnit'!
+!HLSUnitResults commentStamp!
+I am the widget that displays the test results for a previous test run in Helios.
+
+I display.
+
+1. The status of the tests.
+* Progress of the currently running test suite.
+* A list of failed tests.
+* A list of tests that resulted in an error.!
 
 !HLSUnitResults methodsFor: 'accessing'!