Skip to content

Commit f8f69e8

Browse files
committed
tests(texture-import): fix tests
1 parent 7b37863 commit f8f69e8

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

engine/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ set(COMMON_SOURCES
8484
engine/src/assets/AssetImporterContext.cpp
8585
engine/src/assets/Assets/Model/ModelImporter.cpp
8686
engine/src/assets/Assets/Texture/TextureImporter.cpp
87+
engine/src/assets/ValidatedName.cpp
88+
engine/src/utils/ImageProcessing.cpp
8789
engine/src/scripting/native/Scripting.cpp
8890
engine/src/scripting/native/HostString.cpp
8991
engine/src/scripting/native/NativeApi.cpp

tests/engine/assets/TextureParameters.test.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ TEST_F(TextureParametersJsonTest, FromJsonRestoresValues) {
105105
{"convertToSRGB", false},
106106
{"flipVertically", false},
107107
{"format", 2}, // RGBA
108+
{"minFilter", 1}, // Bilinear
108109
{"maxSize", 1024},
109110
{"compressionQuality", 0.75f}
110111
};
@@ -297,6 +298,7 @@ TEST_F(TextureParametersEdgeCasesTest, JsonWithExtraFieldsIgnored) {
297298
{"convertToSRGB", false},
298299
{"flipVertically", true},
299300
{"format", 1},
301+
{"minFilter", 1},
300302
{"maxSize", 2048},
301303
{"compressionQuality", 0.8f},
302304
{"extraField", "should be ignored"},
@@ -335,6 +337,7 @@ TEST_F(TextureParametersEdgeCasesTest, JsonWithInvalidFormatValueAccepted) {
335337
{"convertToSRGB", true},
336338
{"flipVertically", true},
337339
{"format", 99}, // Invalid format value
340+
{"minFilter", 1},
338341
{"maxSize", 4096},
339342
{"compressionQuality", 0.9f}
340343
};

tests/engine/renderer/DrawCommand.test.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ TEST_F(CommandTypeEnumTest, MeshValueIs0) {
2222
EXPECT_EQ(static_cast<int>(CommandType::MESH), 0);
2323
}
2424

25-
TEST_F(CommandTypeEnumTest, FullScreenValueIs1) {
26-
EXPECT_EQ(static_cast<int>(CommandType::FULL_SCREEN), 1);
25+
TEST_F(CommandTypeEnumTest, LineValueIs1) {
26+
EXPECT_EQ(static_cast<int>(CommandType::LINE), 1);
27+
}
28+
29+
TEST_F(CommandTypeEnumTest, FullScreenValueIs2) {
30+
EXPECT_EQ(static_cast<int>(CommandType::FULL_SCREEN), 2);
2731
}
2832

2933
TEST_F(CommandTypeEnumTest, ValuesAreDistinct) {

0 commit comments

Comments
 (0)