yzt
2023-05-05 4c558c77a6a9d23f057f094c4dc3e315eabef497
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);
  });
});