Explorar o código

Updated tests

sanex3339 %!s(int64=5) %!d(string=hai) anos
pai
achega
1f13f71d54

+ 28 - 1
test/functional-tests/javascript-obfuscator/fixtures/prevailing-kind-of-variables-const.js

@@ -1,5 +1,32 @@
+const foo = 'foo';
+const bar = 'bar';
+const baz = 'baz';
+const bark = 'bark';
+const hawk = 'hawk';
+
 function test() {
-    const foo = 'foo';
+    var foo = 'foo';
+
+    if (true) {
+        foo += 'o';
+    }
+
+    if (true) {
+        foo += 'o';
+    }
+
+    if (true) {
+        foo += 'o';
+    }
+
+    if (true) {
+        foo += 'o';
+    }
+
+    if (true) {
+        foo += 'o';
+    }
+
     return foo;
 }
 test();

+ 28 - 1
test/functional-tests/javascript-obfuscator/fixtures/prevailing-kind-of-variables-let.js

@@ -1,5 +1,32 @@
+let foo = 'foo';
+let bar = 'bar';
+let baz = 'baz';
+let bark = 'bark';
+let hawk = 'hawk';
+
 function test() {
-    let foo = 'foo';
+    var foo = 'foo';
+
+    if (true) {
+        foo += 'o';
+    }
+
+    if (true) {
+        foo += 'o';
+    }
+
+    if (true) {
+        foo += 'o';
+    }
+
+    if (true) {
+        foo += 'o';
+    }
+
+    if (true) {
+        foo += 'o';
+    }
+
     return foo;
 }
 test();

+ 27 - 0
test/functional-tests/javascript-obfuscator/fixtures/prevailing-kind-of-variables-var.js

@@ -1,5 +1,32 @@
+var foo = 'foo';
+var bar = 'bar';
+var baz = 'baz';
+var bark = 'bark';
+var hawk = 'hawk';
+
 function test() {
     var foo = 'foo';
+
+    if (true) {
+        foo += 'o';
+    }
+
+    if (true) {
+        foo += 'o';
+    }
+
+    if (true) {
+        foo += 'o';
+    }
+
+    if (true) {
+        foo += 'o';
+    }
+
+    if (true) {
+        foo += 'o';
+    }
+
     return foo;
 }
 test();