42sh 1.0.0
Create a shell in C
Loading...
Searching...
No Matches
test_my_printf.c File Reference

Unit tests for each function of the my_printf. More...

#include "criterion/criterion.h"
#include "criterion/redirect.h"
#include "../lib/my/my_printf/myprintf.h"

Functions

void redirect_all_std (void)
 
 Test (my_printf, my_show_formating)
 
 Test (my_printf, empty_format,.init=redirect_all_std)
 
 Test (my_printf, simple_format,.init=redirect_all_std)
 
 Test (my_printf, wrong_flag_1,.init=redirect_all_std)
 
 Test (my_printf, wrong_flag_2,.init=redirect_all_std)
 
 Test (my_printf, wrong_flag_3,.init=redirect_all_std)
 
 Test (my_printf, one_flag_percent,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_percent_1,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_percent_2,.init=redirect_all_std)
 
 Test (my_printf, one_flag_c,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_c,.init=redirect_all_std)
 
 Test (my_printf, format_flag_c_1,.init=redirect_all_std)
 
 Test (my_printf, format_flag_c_2,.init=redirect_all_std)
 
 Test (my_printf, format_flag_c_3,.init=redirect_all_std)
 
 Test (my_printf, format_flag_c_4,.init=redirect_all_std)
 
 Test (my_printf, format_flag_c_5,.init=redirect_all_std)
 
 Test (my_printf, format_flag_c_6,.init=redirect_all_std)
 
 Test (my_printf, format_flag_c_7,.init=redirect_all_std)
 
 Test (my_printf, format_flag_c_8,.init=redirect_all_std)
 
 Test (my_printf, format_flag_c_9,.init=redirect_all_std)
 
 Test (my_printf, one_flag_s,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_s,.init=redirect_all_std)
 
 Test (my_printf, invalid_flag_s,.init=redirect_all_std)
 
 Test (my_printf, format_flag_s_1,.init=redirect_all_std)
 
 Test (my_printf, format_flag_s_2,.init=redirect_all_std)
 
 Test (my_printf, format_flag_s_3,.init=redirect_all_std)
 
 Test (my_printf, format_flag_s_4,.init=redirect_all_std)
 
 Test (my_printf, format_flag_s_5,.init=redirect_all_std)
 
 Test (my_printf, format_flag_s_6,.init=redirect_all_std)
 
 Test (my_printf, format_flag_s_7,.init=redirect_all_std)
 
 Test (my_printf, format_flag_s_8,.init=redirect_all_std)
 
 Test (my_printf, format_flag_s_9,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bigs,.init=redirect_all_std)
 
 Test (my_printf, one_flag_i,.init=redirect_all_std)
 
 Test (my_printf, one_flag_i_neg,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_i,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_i_neg,.init=redirect_all_std)
 
 Test (my_printf, one_flag_d,.init=redirect_all_std)
 
 Test (my_printf, one_flag_d_neg,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_d,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_d_neg,.init=redirect_all_std)
 
 Test (my_printf, format_flag_d_1,.init=redirect_all_std)
 
 Test (my_printf, format_flag_d_plus,.init=redirect_all_std)
 
 Test (my_printf, format_flag_d_2,.init=redirect_all_std)
 
 Test (my_printf, format_flag_d_3,.init=redirect_all_std)
 
 Test (my_printf, format_flag_d_4,.init=redirect_all_std)
 
 Test (my_printf, format_flag_d_5,.init=redirect_all_std)
 
 Test (my_printf, format_flag_d_6,.init=redirect_all_std)
 
 Test (my_printf, format_flag_d_7,.init=redirect_all_std)
 
 Test (my_printf, format_flag_d_8,.init=redirect_all_std)
 
 Test (my_printf, format_flag_d_9,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_d_1,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_d_2,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_d_3,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_d_4,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_d_5,.init=redirect_all_std)
 
 Test (my_printf, format_flag_double_1,.init=redirect_all_std)
 
 Test (my_printf, format_flag_double_plus,.init=redirect_all_std)
 
 Test (my_printf, format_flag_double_width,.init=redirect_all_std)
 
 Test (my_printf, format_flag_double_moins,.init=redirect_all_std)
 
 Test (my_printf, format_flag_double_esp,.init=redirect_all_std)
 
 Test (my_printf, format_flag_double_esp_a,.init=redirect_all_std)
 
 Test (my_printf, format_flag_double_zero,.init=redirect_all_std)
 
 Test (my_printf, format_flag_double_hash,.init=redirect_all_std)
 
 Test (my_printf, format_flag_double_do_next,.init=redirect_all_std)
 
 Test (my_printf, one_flag_u,.init=redirect_all_std)
 
 Test (my_printf, one_flag_u_neg,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_u,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_u_neg,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_u_1,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_u_2,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_u_3,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_u_4,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_u_5,.init=redirect_all_std)
 
 Test (my_printf, one_flag_b,.init=redirect_all_std)
 
 Test (my_printf, one_flag_b_neg,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_b,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_b_neg,.init=redirect_all_std)
 
 Test (my_printf, format_flag_b_neg,.init=redirect_all_std)
 
 Test (my_printf, one_flag_o,.init=redirect_all_std)
 
 Test (my_printf, one_flag_o_neg,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_o,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_o_neg,.init=redirect_all_std)
 
 Test (my_printf, format_flag_o,.init=redirect_all_std)
 
 Test (my_printf, one_flag_x,.init=redirect_all_std)
 
 Test (my_printf, one_flag_x_neg,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_x,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_x_neg,.init=redirect_all_std)
 
 Test (my_printf, format_flag_x,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bigx,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bigx_neg,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_bigx,.init=redirect_all_std)
 
 Test (my_printf, multiple_flag_bigx_neg,.init=redirect_all_std)
 
 Test (my_printf, format_flag_bigx,.init=redirect_all_std)
 
 Test (my_printf, one_flag_p,.init=redirect_all_std)
 
 Test (my_printf, one_flag_e_zero,.init=redirect_all_std)
 
 Test (my_printf, one_flag_e,.init=redirect_all_std)
 
 Test (my_printf, one_flag_e_neg,.init=redirect_all_std)
 
 Test (my_printf, one_flag_e_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_e_neg_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_e_max,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bige_zero,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bige,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bige_neg,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bige_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bige_neg_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bige_max,.init=redirect_all_std)
 
 Test (my_printf, one_flag_f,.init=redirect_all_std)
 
 Test (my_printf, one_flag_f_neg,.init=redirect_all_std)
 
 Test (my_printf, one_flag_f_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_f_neg_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bigf,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bigf_neg,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bigf_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bigf_neg_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_g_zero,.init=redirect_all_std)
 
 Test (my_printf, one_flag_g,.init=redirect_all_std)
 
 Test (my_printf, one_flag_g_neg,.init=redirect_all_std)
 
 Test (my_printf, one_flag_g_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_g_neg_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_g_max,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bigg_zero,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bigg,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bigg_neg,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bigg_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bigg_neg_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bigg_max,.init=redirect_all_std)
 
 Test (my_printf, one_flag_a_zero,.init=redirect_all_std)
 
 Test (my_printf, one_flag_a,.init=redirect_all_std)
 
 Test (my_printf, one_flag_a_neg,.init=redirect_all_std)
 
 Test (my_printf, one_flag_a_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_a_neg_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_a_max,.init=redirect_all_std)
 
 Test (my_printf, one_flag_biga_zero,.init=redirect_all_std)
 
 Test (my_printf, one_flag_biga,.init=redirect_all_std)
 
 Test (my_printf, one_flag_biga_neg,.init=redirect_all_std)
 
 Test (my_printf, one_flag_biga_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_biga_neg_decimal,.init=redirect_all_std)
 
 Test (my_printf, one_flag_biga_max,.init=redirect_all_std)
 
 Test (my_printf, one_flag_n,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_n_l,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_n_ll,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_n_h,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_n_hh,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_n_z,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_n_j,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_n_t,.init=redirect_all_std)
 
 Test (my_printf, specifier_flag_n_L,.init=redirect_all_std)
 
 Test (my_printf, one_flag_m,.init=redirect_all_std)
 
 Test (my_printf, one_flag_bigd,.init=redirect_all_std)
 
 Test (my_printf, all_formats_1,.init=redirect_all_std)
 
 Test (my_printf, all_formats_2,.init=redirect_all_std)
 
 Test (my_printf, all_formats_star_prc,.init=redirect_all_std)
 
 Test (my_printf, all_formats_star_width,.init=redirect_all_std)
 
 Test (my_printf, flag_a_prc_zero,.init=redirect_all_std)
 
 Test (my_printf, flag_a_prc_x,.init=redirect_all_std)
 
 Test (my_printf, flag_biga_prc_zero,.init=redirect_all_std)
 
 Test (my_printf, flag_biga_prc_x,.init=redirect_all_std)
 
 Test (my_printf, flag_g_prc_zero,.init=redirect_all_std)
 
 Test (my_printf, flag_bigg_prc_zero,.init=redirect_all_std)
 
 Test (my_printf, flag_g_prc_x,.init=redirect_all_std)
 
 Test (my_printf, flag_bigg_prc_x,.init=redirect_all_std)
 
 Test (my_printf, flag_a_prc,.init=redirect_all_std)
 
 Test (my_printf, flag_a_prc_2,.init=redirect_all_std)
 
 Test (my_printf, flag_a_prc_3,.init=redirect_all_std)
 
 Test (my_printf, flag_a_prc_4,.init=redirect_all_std)
 
 Test (my_printf, flag_a_prc_5,.init=redirect_all_std)
 
 Test (my_printf, flag_a_prc_6,.init=redirect_all_std)
 
 Test (my_printf, flag_biga_prc,.init=redirect_all_std)
 
 Test (my_printf, flag_biga_prc_2,.init=redirect_all_std)
 
 Test (my_printf, flag_biga_prc_3,.init=redirect_all_std)
 
 Test (my_printf, flag_biga_prc_4,.init=redirect_all_std)
 
 Test (my_printf, flag_biga_prc_5,.init=redirect_all_std)
 
 Test (my_printf, flag_biga_prc_6,.init=redirect_all_std)
 

Detailed Description

Unit tests for each function of the my_printf.

Author
Nicolas TORO