@ -1680,20 +1680,26 @@ AST_TEST_DEFINE(json_test_cep)
break ;
break ;
}
}
expected = ast_json_pack ( " {s: o, s: o, s: o }" ,
expected = ast_json_pack ( " {s: o, s: o, s: o , s: o, s: o }" ,
" context " , ast_json_null ( ) ,
" context " , ast_json_null ( ) ,
" exten " , ast_json_null ( ) ,
" exten " , ast_json_null ( ) ,
" priority " , ast_json_null ( ) ) ;
" priority " , ast_json_null ( ) ,
uut = ast_json_dialplan_cep ( NULL , NULL , - 1 ) ;
" app_name " , ast_json_null ( ) ,
" app_data " , ast_json_null ( )
) ;
uut = ast_json_dialplan_cep_app ( NULL , NULL , - 1 , NULL , NULL ) ;
ast_test_validate ( test , ast_json_equal ( expected , uut ) ) ;
ast_test_validate ( test , ast_json_equal ( expected , uut ) ) ;
ast_json_unref ( expected ) ;
ast_json_unref ( expected ) ;
ast_json_unref ( uut ) ;
ast_json_unref ( uut ) ;
expected = ast_json_pack ( " {s: s, s: s, s: i }" ,
expected = ast_json_pack ( " {s: s, s: s, s: i , s: s, s: s }" ,
" context " , " main " ,
" context " , " main " ,
" exten " , " 4321 " ,
" exten " , " 4321 " ,
" priority " , 7 ) ;
" priority " , 7 ,
uut = ast_json_dialplan_cep ( " main " , " 4321 " , 7 ) ;
" app_name " , " " ,
" app_data " , " "
) ;
uut = ast_json_dialplan_cep_app ( " main " , " 4321 " , 7 , " " , " " ) ;
ast_test_validate ( test , ast_json_equal ( expected , uut ) ) ;
ast_test_validate ( test , ast_json_equal ( expected , uut ) ) ;
return AST_TEST_PASS ;
return AST_TEST_PASS ;