15832144755
2022-01-06 7b4c8991dca9cf2a809a95e239d144697d3afb56
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
31
32
33
34
35
36
37
38
39
import { ShaderDestination } from "../../Source/Cesium.js";
 
describe("Renderer/ShaderDestination", function () {
  it("includesVertexShader throws for undefined destination", function () {
    expect(function () {
      return ShaderDestination.includesVertexShader(undefined);
    }).toThrowDeveloperError();
  });
 
  it("includesVertexShader works", function () {
    expect(
      ShaderDestination.includesVertexShader(ShaderDestination.VERTEX)
    ).toBe(true);
    expect(
      ShaderDestination.includesVertexShader(ShaderDestination.FRAGMENT)
    ).toBe(false);
    expect(ShaderDestination.includesVertexShader(ShaderDestination.BOTH)).toBe(
      true
    );
  });
 
  it("includesFragmentShader throws for undefined destination", function () {
    expect(function () {
      return ShaderDestination.includesFragmentShader(undefined);
    }).toThrowDeveloperError();
  });
 
  it("includesFragmentShader works", function () {
    expect(
      ShaderDestination.includesFragmentShader(ShaderDestination.VERTEX)
    ).toBe(false);
    expect(
      ShaderDestination.includesFragmentShader(ShaderDestination.FRAGMENT)
    ).toBe(true);
    expect(
      ShaderDestination.includesFragmentShader(ShaderDestination.BOTH)
    ).toBe(true);
  });
});