tools/tests/functional/bad_argument_tests/low_level_api/inflate.cpp
/**
 * @brief Test a more specific @ref qpl_op_decompress operation bad arguments
 */
@brief Test a more specific @ref qpl_op_decompress operation bad arguments
@brief Test a more specific @ref qpl_op_decompress operation bad arguments
QPL_LOW_LEVEL_API_BAD_ARGUMENT_TEST(inflate, extended) {
    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_decompress;
    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));
    job_ptr->ignore_end_bits       = 8u;
    job_ptr->ignore_start_bits     = 0u;
    job_ptr->decomp_end_processing = qpl_stop_and_check_for_bfinal_eob;
    ASSERT_EQ(QPL_STS_INVALID_PARAM_ERR, run_job_api(job_ptr)) << "ignore_end_bits more than 7 bits";
    job_ptr->ignore_end_bits       = 0u;
    job_ptr->ignore_start_bits     = 8u;
    job_ptr->decomp_end_processing = qpl_stop_and_check_for_bfinal_eob;
    ASSERT_EQ(QPL_STS_INVALID_PARAM_ERR, run_job_api(job_ptr)) << "ignore_start_bits more than 7 bits";
    job_ptr->ignore_end_bits       = 0u;
    job_ptr->ignore_start_bits     = 0u;
    job_ptr->decomp_end_processing = 9u;
    ASSERT_EQ(QPL_STS_INVALID_DECOMP_END_PROC_ERR, run_job_api(job_ptr)) << "Incorrect DecompressEndProcessing ";
    job_ptr->ignore_end_bits       = 0u;
    job_ptr->ignore_start_bits     = 0u;
    job_ptr->decomp_end_processing = OWN_RESERVED_INFLATE_MANIPULATOR;
    ASSERT_EQ(QPL_STS_INVALID_DECOMP_END_PROC_ERR, run_job_api(job_ptr)) << "Incorrect DecompressEndProcessing ";
}
QPL_LOW_LEVEL_API_BAD_ARGUMENT_TEST ( inflate , extended ) { 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_decompress ; 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 ) ) ; job_ptr -> ignore_end_bits = 8u ; job_ptr -> ignore_start_bits = 0u ; job_ptr -> decomp_end_processing = qpl_stop_and_check_for_bfinal_eob ; ASSERT_EQ ( QPL_STS_INVALID_PARAM_ERR , run_job_api ( job_ptr ) ) << " " ; job_ptr -> ignore_end_bits = 0u ; job_ptr -> ignore_start_bits = 8u ; job_ptr -> decomp_end_processing = qpl_stop_and_check_for_bfinal_eob ; ASSERT_EQ ( QPL_STS_INVALID_PARAM_ERR , run_job_api ( job_ptr ) ) << " " ; job_ptr -> ignore_end_bits = 0u ; job_ptr -> ignore_start_bits = 0u ; job_ptr -> decomp_end_processing = 9u ; ASSERT_EQ ( QPL_STS_INVALID_DECOMP_END_PROC_ERR , run_job_api ( job_ptr ) ) << " " ; job_ptr -> ignore_end_bits = 0u ; job_ptr -> ignore_start_bits = 0u ; job_ptr -> decomp_end_processing = OWN_RESERVED_INFLATE_MANIPULATOR ; ASSERT_EQ ( QPL_STS_INVALID_DECOMP_END_PROC_ERR , run_job_api ( job_ptr ) ) << " " ; }
@brief Test a more specific @ref qpl_op_decompress operation bad arguments
@brief Test a more specific @ref qpl_op_decompress operation bad arguments
// Preset