Skip to content

Commit

Permalink
[t] Refactor some embed tests. No functional change
Browse files Browse the repository at this point in the history
  • Loading branch information
leto committed Dec 26, 2010
1 parent a105868 commit 55cbcc4
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions t/src/embed.t
Expand Up @@ -241,8 +241,7 @@ c_output_is($common . linedirective(__LINE__) . <<'CODE', <<'OUTPUT', "Hello wor
int main(void)
{
Parrot_Interp interp;
Parrot_String compiler;
Parrot_String errstr;
Parrot_String compiler, errstr;
Parrot_PMC code;
/* Create the interpreter and show a message using parrot io */
Expand Down Expand Up @@ -387,16 +386,8 @@ c_output_is($common . linedirective(__LINE__) . <<'CODE', <<'OUTPUT', "returning
int main(void)
{
Parrot_Interp interp;
Parrot_String compiler;
Parrot_String errstr;
Parrot_PMC code;
Parrot_PMC rootns;
Parrot_String parrotname;
Parrot_PMC parrotns;
Parrot_String subname;
Parrot_PMC sub;
Parrot_String msg;
Parrot_PMC ret;
Parrot_PMC code, rootns, parrotns, sub, ret;
Parrot_String compiler, errstr, parrotname, subname, msg;
/* Create the interpreter */
interp = Parrot_new(NULL);
Expand Down Expand Up @@ -425,12 +416,13 @@ int main(void)
);
/* Get parrot namespace */
rootns = Parrot_get_root_namespace(interp);
rootns = Parrot_get_root_namespace(interp);
parrotname = createstring(interp, "parrot");
parrotns = Parrot_PMC_get_pmc_keyed_str(interp, rootns, parrotname);
parrotns = Parrot_PMC_get_pmc_keyed_str(interp, rootns, parrotname);
/* Get the sub */
subname = createstring(interp, "hello");
sub = Parrot_PMC_get_pmc_keyed_str(interp, parrotns, subname);
sub = Parrot_PMC_get_pmc_keyed_str(interp, parrotns, subname);
/* Execute it */
msg = createstring(interp, "Hello, ");
Expand Down

0 comments on commit 55cbcc4

Please sign in to comment.