diff --git a/tests/generators/colour.xml b/tests/generators/colour.xml index 747e54941..273b372c9 100644 --- a/tests/generators/colour.xml +++ b/tests/generators/colour.xml @@ -60,6 +60,7 @@ + Colour diff --git a/tests/generators/functions.xml b/tests/generators/functions.xml index a3489325d..e43dc7dd5 100644 --- a/tests/generators/functions.xml +++ b/tests/generators/functions.xml @@ -1,6 +1,7 @@ + Functions diff --git a/tests/generators/lists.xml b/tests/generators/lists.xml index aae25dfe6..32fb6aae7 100644 --- a/tests/generators/lists.xml +++ b/tests/generators/lists.xml @@ -1,5 +1,6 @@ + Lists @@ -8281,4 +8282,4 @@ - \ No newline at end of file + diff --git a/tests/generators/logic.xml b/tests/generators/logic.xml index 9737fb812..8131de259 100644 --- a/tests/generators/logic.xml +++ b/tests/generators/logic.xml @@ -1,5 +1,6 @@ + Logic TRUE @@ -1015,4 +1016,4 @@ - \ No newline at end of file + diff --git a/tests/generators/loops1.xml b/tests/generators/loops1.xml index 41dd3b633..41ba34ee2 100644 --- a/tests/generators/loops1.xml +++ b/tests/generators/loops1.xml @@ -1,5 +1,6 @@ + Loops 1 diff --git a/tests/generators/loops2.xml b/tests/generators/loops2.xml index c35623a5d..0f0411c67 100644 --- a/tests/generators/loops2.xml +++ b/tests/generators/loops2.xml @@ -1,5 +1,6 @@ + Loops 2 diff --git a/tests/generators/loops3.xml b/tests/generators/loops3.xml index 508b88729..30f0a2f52 100644 --- a/tests/generators/loops3.xml +++ b/tests/generators/loops3.xml @@ -1,5 +1,6 @@ + Loops 3 diff --git a/tests/generators/math.xml b/tests/generators/math.xml index 3988ebd6e..ae0001375 100644 --- a/tests/generators/math.xml +++ b/tests/generators/math.xml @@ -1,5 +1,6 @@ + Math @@ -1946,4 +1947,4 @@ - \ No newline at end of file + diff --git a/tests/generators/text.xml b/tests/generators/text.xml index 32887ec93..597b3931d 100644 --- a/tests/generators/text.xml +++ b/tests/generators/text.xml @@ -1,5 +1,6 @@ + Text @@ -4647,4 +4648,4 @@ - \ No newline at end of file + diff --git a/tests/generators/unittest.js b/tests/generators/unittest.js index 6b7378210..96bea3342 100644 --- a/tests/generators/unittest.js +++ b/tests/generators/unittest.js @@ -29,7 +29,8 @@ Blockly.Blocks['unittest_main'] = { init: function() { this.setColour(65); this.appendDummyInput() - .appendField('run tests'); + .appendField('run test suite') + .appendField(new Blockly.FieldTextInput(''), 'SUITE_NAME'); this.appendStatementInput('DO'); this.setTooltip('Executes the enclosed unit tests,\n' + 'then prints a summary.'); diff --git a/tests/generators/unittest_dart.js b/tests/generators/unittest_dart.js index 436bcff63..28b14e670 100644 --- a/tests/generators/unittest_dart.js +++ b/tests/generators/unittest_dart.js @@ -59,6 +59,11 @@ Blockly.Dart['unittest_main'] = function(block) { '}']); // Setup global to hold test results. var code = resultsVar + ' = [];\n'; + // Say which test suite this is. + code += 'print(\'\\n====================\\n\\n' + + 'Running suite: ' + + block.getFieldValue('SUITE_NAME') + + '\');\n'; // Run tests (unindented). code += Blockly.Dart.statementToCode(block, 'DO') .replace(/^ /, '').replace(/\n /g, '\n'); diff --git a/tests/generators/unittest_javascript.js b/tests/generators/unittest_javascript.js index 92d8a2913..e483be1b8 100644 --- a/tests/generators/unittest_javascript.js +++ b/tests/generators/unittest_javascript.js @@ -60,6 +60,11 @@ Blockly.JavaScript['unittest_main'] = function(block) { '}']); // Setup global to hold test results. var code = resultsVar + ' = [];\n'; + // Say which test suite this is. + code += 'console.log(\'\\n====================\\n\\n' + + 'Running suite: ' + + block.getFieldValue('SUITE_NAME') + + '\')\n'; // Run tests (unindented). code += Blockly.JavaScript.statementToCode(block, 'DO') .replace(/^ /, '').replace(/\n /g, '\n'); diff --git a/tests/generators/unittest_lua.js b/tests/generators/unittest_lua.js index 2a9015c10..1d0860bdc 100644 --- a/tests/generators/unittest_lua.js +++ b/tests/generators/unittest_lua.js @@ -58,6 +58,11 @@ Blockly.Lua['unittest_main'] = function(block) { 'end']); // Setup global to hold test results. var code = resultsVar + ' = {}\n'; + // Say which test suite this is. + code += 'print(\'\\n====================\\n\\n' + + 'Running suite: ' + + block.getFieldValue('SUITE_NAME') + + '\')\n'; // Run tests (unindented). code += Blockly.Lua.statementToCode(block, 'DO') .replace(/^ /, '').replace(/\n /g, '\n'); diff --git a/tests/generators/unittest_php.js b/tests/generators/unittest_php.js index 54d7e4e97..4d030ea83 100644 --- a/tests/generators/unittest_php.js +++ b/tests/generators/unittest_php.js @@ -52,7 +52,7 @@ Blockly.PHP['unittest_main'] = function(block) { ' array_push($report, "Number of tests run: " . count(' + resultsVar + '));', ' array_push($report, "");', ' if ($fails) {', - ' array_push($report, "FAILED (failures=" . $fails + ")");', + ' array_push($report, "FAILED (failures=" . $fails . ")");', ' } else {', ' array_push($report, "OK");', ' }', @@ -60,6 +60,11 @@ Blockly.PHP['unittest_main'] = function(block) { '}']); // Setup global to hold test results. var code = resultsVar + ' = array();\n'; + // Say which test suite this is. + code += 'print("\\n====================\\n\\n' + + 'Running suite: ' + + block.getFieldValue('SUITE_NAME') + + '\\n");\n'; // Run tests (unindented). code += Blockly.PHP.statementToCode(block, 'DO') .replace(/^ /, '').replace(/\n /g, '\n'); diff --git a/tests/generators/unittest_python.js b/tests/generators/unittest_python.js index 91fabd179..70f6773e1 100644 --- a/tests/generators/unittest_python.js +++ b/tests/generators/unittest_python.js @@ -56,6 +56,11 @@ Blockly.Python['unittest_main'] = function(block) { // Setup global to hold test results. var code = resultsVar + ' = []\n'; + // Say which test suite this is. + code += 'print(\'\\n====================\\n\\n' + + 'Running suite: ' + + block.getFieldValue('SUITE_NAME') + + '\')\n'; // Run tests (unindented). code += Blockly.Python.statementToCode(block, 'DO') .replace(/^ /, '').replace(/\n /g, '\n'); diff --git a/tests/generators/variables.xml b/tests/generators/variables.xml index a3e5848a4..9bc507602 100644 --- a/tests/generators/variables.xml +++ b/tests/generators/variables.xml @@ -1,6 +1,7 @@ + Variables item