diff --git a/test/Materials.cpp b/test/Materials.cpp index 5e58884ace..54d0ff70f7 100644 --- a/test/Materials.cpp +++ b/test/Materials.cpp @@ -184,13 +184,17 @@ TEST_F(MaterialsTest, MaterialParserSortRequest) EXPECT_FALSE(material->getParseFlags() & Material::PF_HasSortDefined); // sort is not explicitly set EXPECT_EQ(material->getSortRequest(), Material::SORT_DECAL); - material = materialManager.getMaterial("textures/parsertest/sortPredefined_custom"); + material = materialManager.getMaterial("textures/parsertest/sort_custom"); EXPECT_TRUE(material->getParseFlags() & Material::PF_HasSortDefined); EXPECT_FLOAT_EQ(material->getSortRequest(), 34.56f); - material = materialManager.getMaterial("textures/parsertest/sortPredefined_custom2"); + material = materialManager.getMaterial("textures/parsertest/sort_custom2"); EXPECT_TRUE(material->getParseFlags() & Material::PF_HasSortDefined); EXPECT_FLOAT_EQ(material->getSortRequest(), 34.56f); + + // Update the sort request + material->setSortRequest(78.45f); + EXPECT_FLOAT_EQ(material->getSortRequest(), 78.45f); } TEST_F(MaterialsTest, MaterialParserAmbientRimColour) diff --git a/test/resources/tdm/materials/parsertest.mtr b/test/resources/tdm/materials/parsertest.mtr index 319cd9bd52..08a23d0a24 100644 --- a/test/resources/tdm/materials/parsertest.mtr +++ b/test/resources/tdm/materials/parsertest.mtr @@ -33,8 +33,8 @@ textures/parsertest/sortPredefined_afterfog { sORt aFteRfog } textures/parsertest/sortPredefined_postprocess { sORt pOstProcess } textures/parsertest/sortPredefined_portalsky { sORt pOrtAlsky } textures/parsertest/sortPredefined_decal_macro { DECAL_MACRO } -textures/parsertest/sortPredefined_custom { sort 34.56 } -textures/parsertest/sortPredefined_custom2 { sort portalsky sort 34.56 } +textures/parsertest/sort_custom { sort 34.56 } +textures/parsertest/sort_custom2 { sort portalsky sort 34.56 } textures/parsertest/withAmbientRimColor {