summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2011-07-17 10:36:31 -0500
committerCraig A. Berry <craigberry@mac.com>2011-07-17 10:49:37 -0500
commit32708f0ba1e66eac30fcacacec55083a2bdf4fa1 (patch)
treeb7c8b47d942e299f1652eeb3362edad65473b772
parent5db9882c5b5d071bd70347ae5b5e248fc73c24d1 (diff)
downloadperl-32708f0ba1e66eac30fcacacec55083a2bdf4fa1.tar.gz
Bring cop label testing in line with intentions.
8375c93eec supplied tests for a newly exported API but the type declarations for the arguments and return values didn't match the types of the API being tested. aebc0cbee0 renamed the functions without updating the calls to those functions in the test. Either of these could have been easily spotted by building with g++ (or other readily available tools) before pushing. This aside from the controversy over whether this particular API is the one that should be publicly exported, so this all may be reverted and replaced before 5.16.0, but hopefully it will unbreak the build for now.
-rw-r--r--ext/XS-APItest/APItest.xs25
1 files changed, 13 insertions, 12 deletions
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index f1766c795e..232a309a97 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -2400,21 +2400,22 @@ void
test_coplabel()
PREINIT:
COP *cop;
- char *label;
- int len, utf8;
+ const char *label;
+ STRLEN len;
+ U32 utf8;
CODE:
cop = &PL_compiling;
- Perl_store_cop_label(aTHX_ cop, "foo", 3, 0);
- label = Perl_fetch_cop_label(aTHX_ cop, &len, &utf8);
- if (strcmp(label,"foo")) croak("fail # fetch_cop_label label");
- if (len != 3) croak("fail # fetch_cop_label len");
- if (utf8) croak("fail # fetch_cop_label utf8");
+ Perl_cop_store_label(aTHX_ cop, "foo", 3, 0);
+ label = Perl_cop_fetch_label(aTHX_ cop, &len, &utf8);
+ if (strcmp(label,"foo")) croak("fail # cop_fetch_label label");
+ if (len != 3) croak("fail # cop_fetch_label len");
+ if (utf8) croak("fail # cop_fetch_label utf8");
/* SMALL GERMAN UMLAUT A */
- Perl_store_cop_label(aTHX_ cop, "foä", 4, SVf_UTF8);
- label = Perl_fetch_cop_label(aTHX_ cop, &len, &utf8);
- if (strcmp(label,"foä")) croak("fail # fetch_cop_label label");
- if (len != 3) croak("fail # fetch_cop_label len");
- if (!utf8) croak("fail # fetch_cop_label utf8");
+ Perl_cop_store_label(aTHX_ cop, "foä", 4, SVf_UTF8);
+ label = Perl_cop_fetch_label(aTHX_ cop, &len, &utf8);
+ if (strcmp(label,"foä")) croak("fail # cop_fetch_label label");
+ if (len != 3) croak("fail # cop_fetch_label len");
+ if (!utf8) croak("fail # cop_fetch_label utf8");
HV *