Permalink
Browse files

Ui improvements for unit testing; streamlining of testing

  • Loading branch information...
1 parent 61d4d75 commit 561c6694e2b050577b17644a387bd003f86b4090 U-CHIMCHIM\bryn committed Apr 22, 2012
Showing with 73 additions and 606 deletions.
  1. +2 −2 bpmv.min.js
  2. +4 −1 unit_tests/boolTestsNeg.js
  3. +18 −16 unit_tests/boolTestsPos.js
  4. +3 −1 unit_tests/emptyTests.js
  5. +46 −586 unit_tests/unit_tests.html
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -1,4 +1,6 @@
-var boolTestsNeg = {};
+var boolTestsNeg = {
+ title : 'Negative Boolean Return'
+};
boolTestsNeg['arr'] = [
[ [ [] ] /*args*/, false /*expect*/, 'Empty Array' ]
@@ -74,6 +76,7 @@ boolTestsNeg['num'] = [
, [ [ undefined ] /*args*/, false /*expect*/, 'undefined proper' ]
];
boolTestsNeg['obj'] = [
+ [ [ {}, true ] /*args*/, false /*expect*/, 'Empty shorthand ("{}") object required non-empty' ]
];
boolTestsNeg['str'] = [
];
View
@@ -1,4 +1,6 @@
-var boolTestsPos = {};
+var boolTestsPos = {
+ title : 'Positive Boolean Return'
+};
boolTestsPos['arr'] = [
[ [ [ 1 ] ] /*args*/, true /*expect*/, 'single item Array' /*note*/ ]
@@ -67,23 +69,23 @@ boolTestsPos['isadog'] = [
, [ [ new RegExp( '.*' ), true ] /*args*/, true /*expect*/, 'new RegExp() with required non-empty source' ]
];
boolTestsPos['num'] = [
- [ [ 1 ] /*args*/, true /*expect*/, 'number 1' ]
- , [ [ '1' ] /*args*/, true /*expect*/, 'string "1"' ]
- , [ [ 1.2 ] /*args*/, true /*expect*/, 'number 1.2' ]
- , [ [ '1.2' ] /*args*/, true /*expect*/, 'string "1.2"' ]
- , [ [ 1.2312312312312312e+29 ] /*args*/, true /*expect*/, 'scientific number 1.2312312312312312e+29' ]
- , [ [ '1.2312312312312312e+29' ] /*args*/, true /*expect*/, 'scientific string "1.2312312312312312e+29"' ]
- , [ [ 0, true ] /*args*/, true /*expect*/, 'number 0, zero or below OK' ]
- , [ [ '0', true ] /*args*/, true /*expect*/, 'string "0", zero or below OK' ]
- , [ [ 0.0, true ] /*args*/, true /*expect*/, 'number 0.0, zero or below OK' ]
- , [ [ '0.0', true ] /*args*/, true /*expect*/, 'string "0.0", zero or below OK' ]
- , [ [ -1, true ] /*args*/, true /*expect*/, 'number -1, zero or below OK' ]
- , [ [ '-1', true ] /*args*/, true /*expect*/, 'string "-1", zero or below OK' ]
+ [ [ 1 ] /*args*/, true /*expect*/, 'Number 1' ]
+ , [ [ '1' ] /*args*/, true /*expect*/, 'String "1"' ]
+ , [ [ 1.2 ] /*args*/, true /*expect*/, 'Number 1.2' ]
+ , [ [ '1.2' ] /*args*/, true /*expect*/, 'String "1.2"' ]
+ , [ [ 1.2312312312312312e+29 ] /*args*/, true /*expect*/, 'Scientific number 1.2312312312312312e+29' ]
+ , [ [ '1.2312312312312312e+29' ] /*args*/, true /*expect*/, 'Scientific string "1.2312312312312312e+29"' ]
+ , [ [ 0, true ] /*args*/, true /*expect*/, 'Number 0, zero or below OK' ]
+ , [ [ '0', true ] /*args*/, true /*expect*/, 'String "0", zero or below OK' ]
+ , [ [ 0.0, true ] /*args*/, true /*expect*/, 'Number 0.0, zero or below OK' ]
+ , [ [ '0.0', true ] /*args*/, true /*expect*/, 'String "0.0", zero or below OK' ]
+ , [ [ -1, true ] /*args*/, true /*expect*/, 'Number -1, zero or below OK' ]
+ , [ [ '-1', true ] /*args*/, true /*expect*/, 'String "-1", zero or below OK' ]
];
boolTestsPos['obj'] = [
- [ [ {} ] /*args*/, true /*expect*/, 'empty shorthand ("{}") object' ]
- , [ [ new Object() ] /*args*/, true /*expect*/, 'empty new Object()' ]
- , [ [ { a : 2 }, true ] /*args*/, true /*expect*/, 'empty shorthand ("{}") object required non-empty' ]
+ [ [ {} ] /*args*/, true /*expect*/, 'Empty shorthand ("{}") object' ]
+ , [ [ new Object() ] /*args*/, true /*expect*/, 'Empty new Object()' ]
+ , [ [ { a : 2 }, true ] /*args*/, true /*expect*/, 'Non-empty shorthand ("{}") object required non-empty' ]
, [ [ new Object( { a : 2 } ), true ] /*args*/, true /*expect*/, 'empty new Object() required non-empty' ]
];
boolTestsPos['str'] = [
View
@@ -1,4 +1,6 @@
-var emptyTests = {};
+var emptyTests = {
+ title : 'Empty Arguments (Default)'
+};
emptyTests['arr'] = [ [ [], false, 'Empty Args' ] ];
emptyTests['basename'] = [ [ [], undefined, 'Empty Args' ] ];
emptyTests['bool'] = [ [ [], false, 'Empty Args' ] ];
Oops, something went wrong.

0 comments on commit 561c669

Please sign in to comment.