From 706e5a873e23ec6bed10ffc86ffb5e5138840f5b Mon Sep 17 00:00:00 2001 From: ryanhamley Date: Wed, 20 Nov 2019 15:19:00 -0800 Subject: [PATCH] fix unit test --- .../expression-tests/sqrt/nan/test.json | 2 +- .../fixture/numbers.output-api-supported.json | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 test/unit/style-spec/fixture/numbers.output-api-supported.json diff --git a/test/integration/expression-tests/sqrt/nan/test.json b/test/integration/expression-tests/sqrt/nan/test.json index 3e946fa5f8c..c4cb124531f 100644 --- a/test/integration/expression-tests/sqrt/nan/test.json +++ b/test/integration/expression-tests/sqrt/nan/test.json @@ -8,7 +8,7 @@ "isZoomConstant": true, "type": "number" }, - "outputs": [2, 0.5, 1], + "outputs": [2, 0.5, null], "serialized": ["sqrt", ["number", ["get", "x"], 1]] } } diff --git a/test/unit/style-spec/fixture/numbers.output-api-supported.json b/test/unit/style-spec/fixture/numbers.output-api-supported.json new file mode 100644 index 00000000000..d264215475a --- /dev/null +++ b/test/unit/style-spec/fixture/numbers.output-api-supported.json @@ -0,0 +1,25 @@ +[ + { + "line": 42, + "message": "layers[2].paint.circle-radius: -1 is less than the minimum value 0" + }, + { + "message": "layers[3].paint.circle-radius: number expected, null found" + }, + { + "line": 58, + "message": "layers[4].paint.circle-radius: missing required property \"stops\"" + }, + { + "line": 66, + "message": "layers[5].paint.circle-radius: number expected, array found" + }, + { + "line": 74, + "message": "layers[6].paint.circle-radius: number expected, boolean found" + }, + { + "line": 6, + "message": "source.data: Unsupported property \"data\"" + } + ]