Lua generator tests pass with new variables

This commit is contained in:
Rachel Fenichel
2017-12-20 15:23:05 -08:00
parent 3d0567fe46
commit fced496d28
2 changed files with 4 additions and 3 deletions

View File

@@ -27,7 +27,7 @@
Blockly.Lua['unittest_main'] = function(block) {
// Container for unit tests.
var resultsVar = Blockly.Lua.variableDB_.getName('unittestResults',
Blockly.Variables.NAME_TYPE);
Blockly.Names.DEVELOPER_VARIABLE_TYPE);
var functionName = Blockly.Lua.provideFunction_(
'unittest_report',
['function ' + Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_ + '()',
@@ -70,7 +70,7 @@ Blockly.Lua['unittest_main'] = function(block) {
Blockly.Lua['unittest_main'].defineAssert_ = function(block) {
var resultsVar = Blockly.Lua.variableDB_.getName('unittestResults',
Blockly.Variables.NAME_TYPE);
Blockly.Names.DEVELOPER_VARIABLE_TYPE);
var functionName = Blockly.Lua.provideFunction_(
'assertEquals',
['function ' + Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_ +
@@ -149,7 +149,7 @@ Blockly.Lua['unittest_assertvalue'] = function(block) {
Blockly.Lua['unittest_fail'] = function(block) {
// Always assert an error.
var resultsVar = Blockly.Lua.variableDB_.getName('unittestResults',
Blockly.Variables.NAME_TYPE);
Blockly.Names.DEVELOPER_VARIABLE_TYPE);
var message = Blockly.Lua.quote_(block.getFieldValue('MESSAGE'));
var functionName = Blockly.Lua.provideFunction_(
'unittest_fail',