[svn:parrot] r48771 - trunk/t/src
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Fri Sep 3 11:07:31 UTC 2010
Author: NotFound
Date: Fri Sep 3 11:07:30 2010
New Revision: 48771
URL: https://trac.parrot.org/parrot/changeset/48771
Log:
rearrange remaining test in src/extend and sr/warnings to make its coverage reports more useful
Modified:
trunk/t/src/extend.t
trunk/t/src/warnings.t
Modified: trunk/t/src/extend.t
==============================================================================
--- trunk/t/src/extend.t Fri Sep 3 06:22:34 2010 (r48770)
+++ trunk/t/src/extend.t Fri Sep 3 11:07:30 2010 (r48771)
@@ -791,14 +791,13 @@
printf("Starting interp %d\n", i);
fflush(stdout);
interp = Parrot_new(NULL);
- if (!interp)
- return 1;
+ if (interp) {
+ Parrot_set_flag(interp, PARROT_DESTROY_FLAG);
- Parrot_set_flag(interp, PARROT_DESTROY_FLAG);
-
- printf("Destroying interp %d\n", i);
- fflush(stdout);
- interp_cleanup(interp, 0);
+ printf("Destroying interp %d\n", i);
+ fflush(stdout);
+ interp_cleanup(interp, 0);
+ }
}
return 0;
Modified: trunk/t/src/warnings.t
==============================================================================
--- trunk/t/src/warnings.t Fri Sep 3 06:22:34 2010 (r48770)
+++ trunk/t/src/warnings.t Fri Sep 3 11:07:30 2010 (r48771)
@@ -39,12 +39,11 @@
Parrot_Interp interp = Parrot_new(NULL);
int error_val;
- if (!interp)
- return 1;
+ if (interp) {
+ print_pbc_location(interp);
- print_pbc_location(interp);
-
- Parrot_exit(interp, 0);
+ Parrot_destroy(interp);
+ }
return 0;
}
CODE
@@ -62,35 +61,34 @@
Parrot_Interp interp = Parrot_new(NULL);
int error_val;
- if (!interp)
- return 1;
-
- PARROT_WARNINGS_on(interp, PARROT_WARNINGS_ALL_FLAG);
+ if (interp) {
+ PARROT_WARNINGS_on(interp, PARROT_WARNINGS_ALL_FLAG);
- error_val = Parrot_warn(interp, PARROT_WARNINGS_ALL_FLAG, "all");
- Parrot_io_eprintf(interp, "%d\n", error_val);
+ error_val = Parrot_warn(interp, PARROT_WARNINGS_ALL_FLAG, "all");
+ Parrot_io_eprintf(interp, "%d\n", error_val);
- /* warnings are on, this should return an error */
- error_val = Parrot_warn(interp, PARROT_WARNINGS_NONE_FLAG, "none");
- Parrot_io_eprintf(interp, "%d\n", error_val);
+ /* warnings are on, this should return an error */
+ error_val = Parrot_warn(interp, PARROT_WARNINGS_NONE_FLAG, "none");
+ Parrot_io_eprintf(interp, "%d\n", error_val);
- error_val = Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG, "undef");
- Parrot_io_eprintf(interp, "%d\n", error_val);
+ error_val = Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG, "undef");
+ Parrot_io_eprintf(interp, "%d\n", error_val);
- error_val = Parrot_warn(interp, PARROT_WARNINGS_IO_FLAG, "io");
- Parrot_io_eprintf(interp, "%d\n", error_val);
+ error_val = Parrot_warn(interp, PARROT_WARNINGS_IO_FLAG, "io");
+ Parrot_io_eprintf(interp, "%d\n", error_val);
- error_val = Parrot_warn(interp, PARROT_WARNINGS_PLATFORM_FLAG, "platform");
- Parrot_io_eprintf(interp, "%d\n", error_val);
+ error_val = Parrot_warn(interp, PARROT_WARNINGS_PLATFORM_FLAG, "platform");
+ Parrot_io_eprintf(interp, "%d\n", error_val);
- error_val = Parrot_warn(interp, PARROT_WARNINGS_DYNEXT_FLAG, "dynext");
- Parrot_io_eprintf(interp, "%d\n", error_val);
+ error_val = Parrot_warn(interp, PARROT_WARNINGS_DYNEXT_FLAG, "dynext");
+ Parrot_io_eprintf(interp, "%d\n", error_val);
- error_val = Parrot_warn(interp, 0, "eek"); /* should return error */
- Parrot_io_eprintf(interp, "%d\n", error_val);
+ error_val = Parrot_warn(interp, 0, "eek"); /* should return error */
+ Parrot_io_eprintf(interp, "%d\n", error_val);
- Parrot_exit(interp, 0);
- return 0;
+ Parrot_destroy(interp);
+ }
+ return 0;
}
CODE
all
More information about the parrot-commits
mailing list