Browse Source

Test case 'unused' tag fixes

The new fastint detection works for both old and new packed boolean tag
(0xfff4 in Duktape 1.3.0, 0xfff5 now).
pull/396/head
Sami Vaarala 9 years ago
parent
commit
88185d5acf
  1. 2
      tests/api/test-dump-load-fastint.c
  2. 2
      tests/ecmascript/test-dev-fastint-basic.js

2
tests/api/test-dump-load-fastint.c

@ -23,7 +23,7 @@ static duk_ret_t test_1(duk_context *ctx) {
duk_eval_string_noresult(ctx, duk_eval_string_noresult(ctx,
"Object.defineProperty(Duktape, 'fastintTag', {\n" "Object.defineProperty(Duktape, 'fastintTag', {\n"
" /* Tag number depends on duk_tval packing. */\n" " /* Tag number depends on duk_tval packing. */\n"
" value: (Duktape.info(true)[1] === 0xfff4) ?\n" " value: (Duktape.info(true)[1] >= 0xfff0) ?\n"
" 0xfff1 /* tag for packed duk_tval */ :\n" " 0xfff1 /* tag for packed duk_tval */ :\n"
" 1 /* tag for unpacked duk_tval */,\n" " 1 /* tag for unpacked duk_tval */,\n"
" writable: false,\n" " writable: false,\n"

2
tests/ecmascript/test-dev-fastint-basic.js

@ -90,7 +90,7 @@ function printFastint(v) {
if (typeof Duktape !== 'object') { if (typeof Duktape !== 'object') {
isfast = ' NOT-DUKTAPE'; isfast = ' NOT-DUKTAPE';
} else if (Duktape.info(true)[1] === 0xfff4) { } else if (Duktape.info(true)[1] >= 0xfff0) {
// packed duk_tval // packed duk_tval
if (Duktape.info(v)[1] === 0xfff1) { if (Duktape.info(v)[1] === 0xfff1) {
isfast = ' fastint'; isfast = ' fastint';

Loading…
Cancel
Save