From 364147a3cf86992ffa6ea26a75032368015fc960 Mon Sep 17 00:00:00 2001 From: kzc Date: Wed, 6 Sep 2017 13:56:06 -0400 Subject: [PATCH] move clearInterval, clearTimeout, setInterval and setTimeout to global_timeout_and_interval_symbols as they do not exist in the test sandbox. --- test/compress/dead-code.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/test/compress/dead-code.js b/test/compress/dead-code.js index ad8fc8e5..aea0e540 100644 --- a/test/compress/dead-code.js +++ b/test/compress/dead-code.js @@ -240,8 +240,6 @@ issue_2233_1: { input: { Array.isArray; Boolean; - //clearInterval; - //clearTimeout; console.log; Date; decodeURI; @@ -265,8 +263,6 @@ issue_2233_1: { String.fromCharCode; RangeError; ReferenceError; - //setInterval; - //setTimeout; SyntaxError; TypeError; unescape; @@ -276,6 +272,23 @@ issue_2233_1: { expect_stdout: true } +global_timeout_and_interval_symbols: { + options = { + pure_getters: "strict", + side_effects: true, + unsafe: true, + } + input: { + // These global symbols do not exist in the test sandbox + // and must be tested separately. + clearInterval; + clearTimeout; + setInterval; + setTimeout; + } + expect: {} +} + issue_2233_2: { options = { pure_getters: "strict",