Add suite name to generator tests

This commit is contained in:
Rachel Fenichel
2018-10-18 17:47:58 -07:00
parent 5fcadc0a05
commit adb1921e21
16 changed files with 42 additions and 6 deletions

View File

@@ -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');