test_fuzzy_json_decode.vader
1 Execute(FuzzyJSONDecode should return the default for empty Lists): 2 AssertEqual [], ale#util#FuzzyJSONDecode([], []) 3 AssertEqual {}, ale#util#FuzzyJSONDecode([], {}) 4 5 Execute(FuzzyJSONDecode should return the default for empty Strings): 6 AssertEqual [], ale#util#FuzzyJSONDecode('', []) 7 AssertEqual {}, ale#util#FuzzyJSONDecode('', {}) 8 9 Execute(FuzzyJSONDecode should return the default value for ['']): 10 AssertEqual [], ale#util#FuzzyJSONDecode([''], []) 11 AssertEqual {}, ale#util#FuzzyJSONDecode([''], {}) 12 13 Execute(FuzzyJSONDecode should return the default value for only whitespace lines): 14 AssertEqual [], ale#util#FuzzyJSONDecode(['', "\n"], []) 15 AssertEqual {}, ale#util#FuzzyJSONDecode(['', "\n"], {}) 16 17 Execute(FuzzyJSONDecode should return the default for Lists with invalid JSON): 18 AssertEqual [], ale#util#FuzzyJSONDecode(['x'], []) 19 AssertEqual {}, ale#util#FuzzyJSONDecode(['x'], {}) 20 21 Execute(FuzzyJSONDecode should return the default for Strings with invalid JSON): 22 AssertEqual [], ale#util#FuzzyJSONDecode('x', []) 23 AssertEqual {}, ale#util#FuzzyJSONDecode('x', {}) 24 25 Execute(FuzzyJSONDecode should return the JSON from the JSON string): 26 AssertEqual {'x': 3}, ale#util#FuzzyJSONDecode('{"x": 3}', []) 27 AssertEqual {'x': 3}, ale#util#FuzzyJSONDecode('{"x": 3}', {}) 28 AssertEqual {'x': 3}, ale#util#FuzzyJSONDecode(['{"x"', ': 3}'], []) 29 AssertEqual {'x': 3}, ale#util#FuzzyJSONDecode(['{"x"', ': 3}'], {})