fix tests

This commit is contained in:
Rachel Fenichel
2017-12-15 14:07:17 -08:00
parent 66975c8f94
commit df1d5ba525
2 changed files with 6 additions and 3 deletions

View File

@@ -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();
}

View File

@@ -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();
}