mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
fix tests
This commit is contained in:
@@ -175,7 +175,8 @@ function test_fieldVariable_getVariableTypes_nullVariableTypes() {
|
||||
fieldVariable.variableTypes = null;
|
||||
|
||||
var resultTypes = fieldVariable.getVariableTypes_();
|
||||
isEqualArrays(resultTypes, ['type1', 'type2']);
|
||||
// The empty string is always one of the options.
|
||||
isEqualArrays(resultTypes, ['type1', 'type2', '']);
|
||||
workspace.dispose();
|
||||
}
|
||||
|
||||
|
||||
@@ -269,14 +269,16 @@ function test_getVariableTypes_Trivial() {
|
||||
variable_map.createVariable('name3', 'type2', 'id3');
|
||||
variable_map.createVariable('name4', 'type3', 'id4');
|
||||
var result_array = variable_map.getVariableTypes();
|
||||
isEqualArrays(['type1', 'type2', 'type3'], result_array);
|
||||
// The empty string is always an option.
|
||||
isEqualArrays(['type1', 'type2', 'type3', ''], result_array);
|
||||
variableMapTest_tearDown();
|
||||
}
|
||||
|
||||
function test_getVariableTypes_None() {
|
||||
variableMapTest_setUp();
|
||||
// The empty string is always an option.
|
||||
var result_array = variable_map.getVariableTypes();
|
||||
isEqualArrays([], result_array);
|
||||
isEqualArrays([''], result_array);
|
||||
variableMapTest_tearDown();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user