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
[ROCm/rocjpeg commit: b7a8ded8ef]
This commit is contained in:
gecommit door
GitHub
bovenliggende
a7be0436a5
commit
a28971302c
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -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) {
|
||||
|
||||
Verwijs in nieuw issue
Block a user