Commits

urso committed 53f2ad1

few more jsdoc comments

Comments (0)

Files changed (1)

 };
 
 /**
- * @ignore
+ * @private
  */
 Distribution.prototype.normalize = function () {
     var sum = 0;
     return newArgs;
 }
 
+/**
+ * tests the property.
+ *
+ * @param {Config} config configuration to test property with
+ * @return depending on test result a Pass, Fail or Invalid object
+ */
 Prop.prototype.run = function (config) {
     var stats = new Stats();
     var size = 0;
     this.invalid = 0;
 
     /**
+     * list of tags (created by calling Case.classify) with counts
      * @field
      */
     this.tags = [];
 
     /**
+     * Histogram of collected values (create by calling Case.collect)
      * @field
      */
     this.collected = null;
 }
 
 /**
- * @ignore
+ * @private
  */
 Stats.prototype.incInvalid = function () { 
     this.invalid += 1; 
 };
 
 /**
- * @ignore
+ * @private
  */
 Stats.prototype.incPass = function () { 
     this.pass += 1; 
 };
 
 /**
- * @ignore
+ * @private
  */
 Stats.prototype.addTags = function(ts) {
     for (var i = 0; i < ts.length; i++) {
 }
 
 /**
- * @ignore
+ * @private
  */
 Stats.prototype.newResult = function (prop) {
     if (this.pass > 0) {
     return "(pass=" + this.pass + ", invalid=" + this.invalid + ")";
 }
 
+/**
+ * Builds and registers a new property.
+ *
+ * @param name the property's name
+ * @param gens Array of generators (length == arity of body function).  Entry
+ *             at position i will drive the i-th argument of the body function. 
+ * @param body the properties testing function
+ *
+ * @return a new registered Property object.
+ */
 function declare(name, gens, body) {
     var theProp = new Prop(name, gens, body);
     allProps.push(theProp);
 }
 
 /**
- * @ignore
+ * tests if runloop should continue testing a property based
+ * on test statistics to date.
+ *
+ * @private
  */
 Config.prototype.needsWork = function (count) {
     return count.invalid < this.maxInvalid &&
         count.pass < this.maxPass;
 };
 
-
+/**
+ * @private
+ */
 function shrinkLoop(config, prop, size, args) {
     var failedArgs = [args];
     var shrinkedArgs = [];
 
 // generic 'console' listener. When overwriting implement log and warn
 /**
+ * Abstract class for building 'console' based listeners.
+ * Subclasses MUST implement the function 'log' and 'warn'.
+ *
+ * @param maxCollected maximum number of collected elements to display in console
+ *
  * @class
  */
 function ConsoleListener(maxCollected) {
     return Math.random();
 }
 
+/**
+ * @constant
+ */
 var justSize = {
     arb: function (size) { 
             return size; 
     };
 }
 
+/**
+ * @constant
+ */
 var arbBool = {
     arb: choose(false, true)
 };
     }
 }
 
+/**
+ * @constant
+ */
 var arbWholeNum = {
     arb: randWhole,
     shrink: function(size, x) {
     }
 };
 
+/**
+ * @constant
+ */
 var arbInt = {
     arb: randInt,
     shrink: function(size, x) {
     }
 };
 
+/**
+ * @constant
+ */
 var arbFloatUnit = {
     arb: randFloatUnit,
     shrink: function(size, x) {
     }
 };
 
-
+/**
+ * @constant
+ */
 var arbNull = {
     arb: function () { 
             return null; 
     }
 }
 
+/**
+ * @constant
+ */
 var arbDate = {
     arb: function() { return new Date(); }
 }
     }
 }
 
+/**
+ * @constant
+ */
 var arbChar = arbMod(arbChoose(arbRange(32,255)),
                      function(num) {
                          return String.fromCharCode(num);
                      });
 
+/**
+ * @constant
+ */
 var arbString = new function() {
     var a = arbArray(arbRange(32,255));
 
     return this;
 }
 
+/**
+ * @constant
+ */
 var arbUndef = arbConst(undefined);
 
 function arbUndefOr(opt) {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.