mapbox/mapbox-gl-native — pull request #358 by mikemorris (2014-07-08 01:21:11+00:00)
Title: Malformed

Refs #219

There's some duplication in here between `bin/fuzz-style.js` and `bin/build-style.js` that should likely be consolidated, but here's an initial sketch of a test for malformed color strings in `json.constants` of the default stylesheet. `stylefile.good()` appears to be correctly flagged as `false` with no crashing when proceeding to set a bad style:

```
ASSERT_FALSE(stylefile.good());
std::stringstream stylejson;
stylejson << stylefile.rdbuf();
map.setStyleJSON(stylejson.str());
```

/cc @kkaefer @mourner