@@ -388,7 +388,7 @@ static mp_obj_t extra_coverage(void) {
388
388
mp_printf (& mp_plat_print , "# str\n" );
389
389
390
390
// intern string
391
- mp_printf (& mp_plat_print , "%d\n" , mp_obj_is_qstr (mp_obj_str_intern (mp_obj_new_str ("intern me" , 9 ))));
391
+ mp_printf (& mp_plat_print , "%d\n" , mp_obj_is_qstr (mp_obj_str_intern (mp_obj_new_str_from_cstr ("intern me" ))));
392
392
}
393
393
394
394
// bytearray
@@ -471,12 +471,12 @@ static mp_obj_t extra_coverage(void) {
471
471
// call mp_call_function_1_protected
472
472
mp_call_function_1_protected (MP_OBJ_FROM_PTR (& mp_builtin_abs_obj ), MP_OBJ_NEW_SMALL_INT (1 ));
473
473
// call mp_call_function_1_protected with invalid args
474
- mp_call_function_1_protected (MP_OBJ_FROM_PTR (& mp_builtin_abs_obj ), mp_obj_new_str ("abc" , 3 ));
474
+ mp_call_function_1_protected (MP_OBJ_FROM_PTR (& mp_builtin_abs_obj ), mp_obj_new_str_from_cstr ("abc" ));
475
475
476
476
// call mp_call_function_2_protected
477
477
mp_call_function_2_protected (MP_OBJ_FROM_PTR (& mp_builtin_divmod_obj ), MP_OBJ_NEW_SMALL_INT (1 ), MP_OBJ_NEW_SMALL_INT (1 ));
478
478
// call mp_call_function_2_protected with invalid args
479
- mp_call_function_2_protected (MP_OBJ_FROM_PTR (& mp_builtin_divmod_obj ), mp_obj_new_str ("abc" , 3 ), mp_obj_new_str ("abc" , 3 ));
479
+ mp_call_function_2_protected (MP_OBJ_FROM_PTR (& mp_builtin_divmod_obj ), mp_obj_new_str_from_cstr ("abc" ), mp_obj_new_str_from_cstr ("abc" ));
480
480
481
481
// mp_obj_int_get_checked with mp_obj_int_t that has a value that is a small integer
482
482
mp_printf (& mp_plat_print , "%d\n" , mp_obj_int_get_checked (mp_obj_int_new_mpz ()));
@@ -733,7 +733,7 @@ static mp_obj_t extra_coverage(void) {
733
733
// mp_obj_is_integer accepts ints and booleans
734
734
mp_printf (& mp_plat_print , "%d %d\n" , mp_obj_is_integer (MP_OBJ_NEW_SMALL_INT (1 )), mp_obj_is_integer (mp_obj_new_int_from_ll (1 )));
735
735
mp_printf (& mp_plat_print , "%d %d\n" , mp_obj_is_integer (mp_const_true ), mp_obj_is_integer (mp_const_false ));
736
- mp_printf (& mp_plat_print , "%d %d\n" , mp_obj_is_integer (mp_obj_new_str ("1" , 1 )), mp_obj_is_integer (mp_const_none ));
736
+ mp_printf (& mp_plat_print , "%d %d\n" , mp_obj_is_integer (mp_obj_new_str_from_cstr ("1" )), mp_obj_is_integer (mp_const_none ));
737
737
738
738
// mp_obj_is_int accepts small int and object ints
739
739
mp_printf (& mp_plat_print , "%d %d\n" , mp_obj_is_int (MP_OBJ_NEW_SMALL_INT (1 )), mp_obj_is_int (mp_obj_new_int_from_ll (1 )));
0 commit comments