Skip to content

Commit

Permalink
fix test missmatch bug (#922)
Browse files Browse the repository at this point in the history
* fix: test update
  • Loading branch information
yangfengzzz authored Aug 4, 2022
1 parent 1228a9c commit ee6d11a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions tests/src/core/material/BlinnPhongMaterial.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ describe("BlinnPhongMaterial", () => {
expect(material.shininess).to.eq(16);
expect(material.tilingOffset).to.deep.eq(new Vector4(1, 1, 0, 0));

material.baseColor.setValue(1, 0, 0, 1);
material.specularColor.setValue(1, 0, 0, 1);
material.emissiveColor.setValue(1, 0, 0, 1);
material.baseColor.set(1, 0, 0, 1);
material.specularColor.set(1, 0, 0, 1);
material.emissiveColor.set(1, 0, 0, 1);
material.baseTexture = texture;
material.specularTexture = texture;
material.emissiveTexture = texture;
material.normalTexture = texture;
material.normalIntensity = 2;
material.shininess = 32;
material.tilingOffset.setValue(1, 1, 1, 1);
material.tilingOffset.set(1, 1, 1, 1);

expect(material.baseColor).to.deep.eq(new Color(1, 0, 0, 1));
expect(material.specularColor).to.deep.eq(new Color(1, 0, 0, 1));
Expand Down
6 changes: 3 additions & 3 deletions tests/src/core/material/PBRBaseMaterial.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ describe("PBRBaseMaterial", () => {
expect(material.normalTexture).to.be.undefined;
expect(material.occlusionTexture).to.be.undefined;

material.baseColor.setValue(1, 0, 0, 1);
material.emissiveColor.setValue(1, 0, 0, 1);
material.tilingOffset.setValue(1, 1, 1, 1);
material.baseColor.set(1, 0, 0, 1);
material.emissiveColor.set(1, 0, 0, 1);
material.tilingOffset.set(1, 1, 1, 1);
material.normalTextureIntensity = 2;
material.occlusionTextureIntensity = 2;
material.baseTexture = texture;
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/material/PBRSpecularMaterial.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe("PBRSpecularMaterial", () => {
expect(material.glossiness).to.eq(1);
expect(material.specularGlossinessTexture).to.be.undefined;

material.specularColor.setValue(1, 0, 0, 1);
material.specularColor.set(1, 0, 0, 1);
material.glossiness = 2;
material.specularGlossinessTexture = texture;

Expand Down
4 changes: 2 additions & 2 deletions tests/src/core/material/UnlitMaterial.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ describe("UnlitMaterial", () => {
expect(material.tilingOffset).to.deep.eq(new Vector4(1, 1, 0, 0));
expect(material.baseTexture).to.be.undefined;

material.baseColor.setValue(1, 0, 0, 1);
material.tilingOffset.setValue(1, 1, 1, 1);
material.baseColor.set(1, 0, 0, 1);
material.tilingOffset.set(1, 1, 1, 1);
material.baseTexture = texture;

expect(material.baseColor).to.deep.eq(new Color(1, 0, 0, 1));
Expand Down

0 comments on commit ee6d11a

Please sign in to comment.