Skip to content

Commit

Permalink
Add some code coverage to the new embed API
Browse files Browse the repository at this point in the history
  • Loading branch information
leto committed Jul 9, 2011
1 parent b633ce4 commit 290ad87
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion t/src/embed/api.t
Expand Up @@ -273,7 +273,7 @@ c_output_is( linedirective(__LINE__) . <<"CODE", << 'OUTPUT', "Parrot_api_get_ex
#include "imcc/api.h"
int main(void) {
Parrot_PMC interp, exception;
Parrot_PMC interp, exception, pmc;
Parrot_String errmsg, backtrace;
Parrot_Int exit_code, is_error;
Expand All @@ -284,6 +284,15 @@ int main(void) {
Parrot_api_get_result(interp, &is_error, &exception, &exit_code, &errmsg);
Parrot_api_get_exception_backtrace(interp, exception, &backtrace);
printf("%s",backtrace);
/* Covers code for a null exception pmc being passed in */
Parrot_api_get_result(interp, &is_error, &pmc, &exit_code, &errmsg);
/* Covers code for a null backtrace pmc being passed in */
Parrot_api_get_exception_backtrace(interp, exception, &pmc);
printf("%s",backtrace);
}
CODE
Expand Down

0 comments on commit 290ad87

Please sign in to comment.