Hi, the following test fails because boolean.pmc actually registers the global True as a false boolean, and no boolean for False. It is fixed with the patch below.

John


find_global P0, "True" find_global P1, "False"

if P0, L1
print "Error, True is not true"
L1: unless P1, L2
print "Error, False is not false"
L2:
end



Index: classes/boolean.pmc =================================================================== --- classes/boolean.pmc (revision 7992) +++ classes/boolean.pmc (working copy) @@ -42,11 +42,15 @@ if (pass) { PMC *t; STRING *s; + t = pmc_new(INTERP, enum_class_Boolean); PMC_int_val(t) = 1; s = CONST_STRING(INTERP, "True"); Parrot_store_global(INTERP, NULL, s, t); + t = pmc_new(INTERP, enum_class_Boolean); + PMC_int_val(t) = 0; + s = CONST_STRING(INTERP, "False"); Parrot_store_global(INTERP, NULL, s, t); } }



Reply via email to