[svn:parrot] r43640 - in branches/kill_array_pmc: src t/op
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Fri Jan 29 16:06:23 UTC 2010
Author: whiteknight
Date: Fri Jan 29 16:06:23 2010
New Revision: 43640
URL: https://trac.parrot.org/parrot/changeset/43640
Log:
the decodetime op now returns an HLL-overridable FixedIntegerArray PMC instead of an Array. Update tests in t/op/time.t to reflect that (with TODO note about how we should test the HLL-override portion
Modified:
branches/kill_array_pmc/src/utils.c
branches/kill_array_pmc/t/op/time.t
Modified: branches/kill_array_pmc/src/utils.c
==============================================================================
--- branches/kill_array_pmc/src/utils.c Fri Jan 29 15:59:49 2010 (r43639)
+++ branches/kill_array_pmc/src/utils.c Fri Jan 29 16:06:23 2010 (r43640)
@@ -544,8 +544,9 @@
tm_to_array(PARROT_INTERP, ARGIN(const struct tm *tm))
{
ASSERT_ARGS(tm_to_array)
- /* TT #1270 Should make this a FixedIntegerArray instead of an Array */
- PMC * const Array = pmc_new(interp, enum_class_FixedPMCArray);
+
+ PMC * const Array = pmc_new(interp,
+ Parrot_get_ctx_HLL_type(interp, enum_class_FixedIntegerArray));
VTABLE_set_integer_native(interp, Array, 9);
VTABLE_set_integer_keyed_int(interp, Array, 0, tm->tm_sec);
Modified: branches/kill_array_pmc/t/op/time.t
==============================================================================
--- branches/kill_array_pmc/t/op/time.t Fri Jan 29 15:59:49 2010 (r43639)
+++ branches/kill_array_pmc/t/op/time.t Fri Jan 29 16:06:23 2010 (r43640)
@@ -140,7 +140,9 @@
$I0 = $P0
is($I0, 9, "decodetime result has 9 values")
$S0 = typeof $P0
- is($S0, "Array", "decodetime returns the correct PMC type")
+ # TODO: Actually, this should return whatever HLL type replaces
+ # FixedIntegerArray. We should test this behavior with a new HLL
+ is($S0, "FixedIntegerArray", "decodetime returns the correct PMC type")
.end
.sub test_localtime_s_i
@@ -156,7 +158,9 @@
$I0 = $P0
is($I0, 9, "decodelocaltime result has 9 values")
$S0 = typeof $P0
- is($S0, "Array", "decodelocaltime returns the correct PMC type")
+ # TODO: Actually, this should return whatever HLL type replaces
+ # FixedIntegerArray. We should test this behavior with a new HLL
+ is($S0, "FixedIntegerArray", "decodelocaltime returns the correct PMC type")
.end
More information about the parrot-commits
mailing list