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:
committato da
GitHub
parent
232a9c6906
commit
b7a8ded8ef
@@ -63,6 +63,7 @@ typedef enum {
|
||||
ROCJPEG_STATUS_HW_JPEG_DECODER_NOT_SUPPORTED = -10, /**< Hardware JPEG decoder is not supported. */
|
||||
ROCJPEG_STATUS_RUNTIME_ERROR = -11, /**< Runtime error occurred. */
|
||||
ROCJPEG_STATUS_NOT_IMPLEMENTED = -12, /**< The requested feature is not implemented. */
|
||||
ROCJPEG_STATUS_MAX_VALUE = -13, /**< Maximum status code value. */
|
||||
} RocJpegStatus;
|
||||
|
||||
/**
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user