[ARM,MIPS] Skip slow tests
[WebKit-https.git] / JSTests / stress / global-const-redeclaration-setting-4.js
1 var setGlobalConstRedeclarationShouldNotThrow = $vm.setGlobalConstRedeclarationShouldNotThrow;
2
3 function assert(b) {
4     if (!b)
5         throw new Error("Bad assertion.");
6 }
7
8 setGlobalConstRedeclarationShouldNotThrow(); // Allow duplicate const declarations at the global level.
9
10 load("./global-const-redeclaration-setting/first.js");
11 assert(foo === 20);
12 let threw = false;
13 try {
14     load("./global-const-redeclaration-setting/let.js"); // Redeclaration a 'let' variable should throw because this doesn't break backwards compat.
15 } catch(e) {
16     threw = true;
17 }
18
19 assert(threw);
20 assert(foo === 20);