Test: update TestInvalidGetErrorName test to cover all possible error names (#144)

* Test: update TestInvalidGetErrorName test to cover all possible error names

* Add ROCJPEG_STATUS_MAX_VALUE

* clean up
This commit is contained in:
Aryan Salmanpour
2025-04-23 15:35:19 -04:00
committed by GitHub
orang tua 232a9c6906
melakukan b7a8ded8ef
2 mengubah file dengan 2 tambahan dan 1 penghapusan
@@ -334,7 +334,7 @@ int RocJpegApiNegativeTests::TestInvalidGetErrorName() {
}
// Scenario 2: Pass a valid error code and ensure it returns a non-null name
for (int i = 0; i >= -8; i--) {
for (int i = 0; i >= ROCJPEG_STATUS_MAX_VALUE; i--) {
RocJpegStatus valid_status = static_cast<RocJpegStatus>(i);;
error_name = rocJpegGetErrorName(valid_status);
if (error_name == nullptr) {