tools/tests/functional/bad_argument_tests/low_level_api/deflate.cpp
/**
 * @brief Bad argument test for @ref qpl_op_compress operation
 */
@brief Bad argument test for @ref qpl_op_compress operation
@brief Bad argument test for @ref qpl_op_compress operation
QPL_LOW_LEVEL_API_BAD_ARGUMENT_TEST(deflate, base) {
    std::array<uint8_t, SOURCE_ARRAY_SIZE> source{};
    std::array<uint8_t, DESTINATION_ARRAY_SIZE> destination{};
    source.fill(0);
    destination.fill(0);
    job_ptr->op = qpl_op_compress;
    set_input_stream(job_ptr,
                     source.data(),
                     (uint32_t) source.size(),
                     NOT_APPLICABLE_PARAMETER,
                     NOT_APPLICABLE_PARAMETER,
                     static_cast<qpl_parser>(NOT_APPLICABLE_PARAMETER));
    set_output_stream(job_ptr, destination.data(),
                      (uint32_t) destination.size(),
                      static_cast<qpl_out_format>(NOT_APPLICABLE_PARAMETER));
    ASSERT_EQ(QPL_STS_NULL_PTR_ERR, run_job_api(nullptr));
    job_ptr->next_in_ptr = nullptr;
    ASSERT_EQ(QPL_STS_NULL_PTR_ERR, run_job_api(job_ptr));
    job_ptr->next_in_ptr = source.data();
    job_ptr->next_out_ptr = nullptr;
    ASSERT_EQ(QPL_STS_NULL_PTR_ERR, run_job_api(job_ptr));
    job_ptr->next_out_ptr = destination.data();
    job_ptr->available_in = 0u;
    ASSERT_EQ(QPL_STS_SIZE_ERR, run_job_api(job_ptr));
    job_ptr->available_in = SOURCE_ARRAY_SIZE;
    job_ptr->available_out = 0u;
    ASSERT_EQ(QPL_STS_SIZE_ERR, run_job_api(job_ptr));
}
QPL_LOW_LEVEL_API_BAD_ARGUMENT_TEST ( deflate , base ) { std :: array < uint8_t , SOURCE_ARRAY_SIZE > source { } ; std :: array < uint8_t , DESTINATION_ARRAY_SIZE > destination { } ; source . fill ( 0 ) ; destination . fill ( 0 ) ; job_ptr -> op = qpl_op_compress ; set_input_stream ( job_ptr , source . data ( ) , ( uint32_t ) source . size ( ) , NOT_APPLICABLE_PARAMETER , NOT_APPLICABLE_PARAMETER , static_cast < qpl_parser > ( NOT_APPLICABLE_PARAMETER ) ) ; set_output_stream ( job_ptr , destination . data ( ) , ( uint32_t ) destination . size ( ) , static_cast < qpl_out_format > ( NOT_APPLICABLE_PARAMETER ) ) ; ASSERT_EQ ( QPL_STS_NULL_PTR_ERR , run_job_api ( nullptr ) ) ; job_ptr -> next_in_ptr = nullptr ; ASSERT_EQ ( QPL_STS_NULL_PTR_ERR , run_job_api ( job_ptr ) ) ; job_ptr -> next_in_ptr = source . data ( ) ; job_ptr -> next_out_ptr = nullptr ; ASSERT_EQ ( QPL_STS_NULL_PTR_ERR , run_job_api ( job_ptr ) ) ; job_ptr -> next_out_ptr = destination . data ( ) ; job_ptr -> available_in = 0u ; ASSERT_EQ ( QPL_STS_SIZE_ERR , run_job_api ( job_ptr ) ) ; job_ptr -> available_in = SOURCE_ARRAY_SIZE ; job_ptr -> available_out = 0u ; ASSERT_EQ ( QPL_STS_SIZE_ERR , run_job_api ( job_ptr ) ) ; }
@brief Bad argument test for @ref qpl_op_compress operation
@brief Bad argument test for @ref qpl_op_compress operation
// Preset