summaryrefslogtreecommitdiff
path: root/platform/darwin
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-08-21 16:19:43 -0700
committerChris Loer <chris.loer@mapbox.com>2018-08-21 22:02:51 -0700
commitfd1767efba85dcfa5a3db27136306eca53519b8a (patch)
tree01be0a98566dfd07cf54fe0bcc53ebfa9675437c /platform/darwin
parent33cd094d853f9c74aeaa1466e9fe6986db448139 (diff)
downloadqtlocation-mapboxgl-fd1767efba85dcfa5a3db27136306eca53519b8a.tar.gz
[core, test] Bump GL JS pin to bring gl-native back in sync with gl-js.
Requires changing `generate-style-code` to treat 'formatted' as being the same as 'string' until gl-native gets 'formatted' support with https://github.com/mapbox/mapbox-gl-native/pull/12624. To make nitpick happy, PropertyFunction.java uses the latest "text-field" description from v8.json. It's technically correct, just kind of pointless since the "If a plain `string` is provided" clause will always be true.
Diffstat (limited to 'platform/darwin')
-rwxr-xr-xplatform/darwin/scripts/generate-style-code.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js
index 0e5bf89fd4..e89a4e29a3 100755
--- a/platform/darwin/scripts/generate-style-code.js
+++ b/platform/darwin/scripts/generate-style-code.js
@@ -102,6 +102,7 @@ global.objCTestValue = function (property, layerType, arraysAsStructs, indent) {
return property.default ? '@"false"' : '@"true"';
case 'number':
return '@"1"';
+ case 'formatted':
case 'string':
return `@"'${_.startCase(propertyName)}'"`;
case 'enum':
@@ -146,6 +147,7 @@ global.mbglTestValue = function (property, layerType) {
return property.default ? 'false' : 'true';
case 'number':
return '1.0';
+ case 'formatted':
case 'string':
return `"${_.startCase(propertyName)}"`;
case 'enum': {
@@ -218,6 +220,7 @@ global.testHelperMessage = function (property, layerType, isFunction) {
return 'testBool' + fnSuffix;
case 'number':
return 'testNumber' + fnSuffix;
+ case 'formatted':
case 'string':
return 'testString' + fnSuffix;
case 'enum':
@@ -385,6 +388,7 @@ global.describeType = function (property) {
return 'Boolean';
case 'number':
return 'numeric';
+ case 'formatted':
case 'string':
return 'string';
case 'enum':
@@ -428,6 +432,7 @@ global.describeValue = function (value, property, layerType) {
return value ? '`YES`' : '`NO`';
case 'number':
return 'the float ' + '`' + formatNumber(value) + '`';
+ case 'formatted':
case 'string':
if (value === '') {
return 'the empty string';
@@ -509,6 +514,7 @@ global.propertyType = function (property) {
return 'NSNumber *';
case 'number':
return 'NSNumber *';
+ case 'formatted':
case 'string':
return 'NSString *';
case 'enum':
@@ -539,7 +545,8 @@ global.isInterpolatable = function (property) {
const type = property.type === 'array' ? property.value : property.type;
return type !== 'boolean' &&
type !== 'enum' &&
- type !== 'string';
+ type !== 'string' &&
+ type !== 'formatted';
};
global.valueTransformerArguments = function (property) {
@@ -549,6 +556,7 @@ global.valueTransformerArguments = function (property) {
return ['bool', objCType];
case 'number':
return ['float', objCType];
+ case 'formatted':
case 'string':
return ['std::string', objCType];
case 'enum':
@@ -582,6 +590,7 @@ global.mbglType = function(property) {
return 'bool';
case 'number':
return 'float';
+ case 'formatted':
case 'string':
return 'std::string';
case 'enum': {