yzt
2023-05-26 de4278af2fd46705a40bac58ec01122db6b7f3d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { StyleExpression } from "../../Source/Cesium.js";
 
describe("Scene/StyleExpression", function () {
  function MockFeature() {}
 
  MockFeature.prototype.getPropertyInherited = function (name) {
    return undefined;
  };
 
  it("throws", function () {
    var expression = new StyleExpression();
    var feature = new MockFeature();
 
    expect(function () {
      return expression.evaluate(feature);
    }).toThrowDeveloperError();
 
    expect(function () {
      return expression.evaluateColor(feature);
    }).toThrowDeveloperError();
 
    expect(function () {
      return expression.getShaderFunction("getColor()", {}, {}, "vec4");
    }).toThrowDeveloperError();
 
    expect(function () {
      return expression.getVariables("");
    }).toThrowDeveloperError();
  });
});