Title: [221078] trunk/JSTests
Revision
221078
Author
[email protected]
Date
2017-08-23 09:28:29 -0700 (Wed, 23 Aug 2017)

Log Message

Fix verbose in tests

Modified Paths


Diff

Modified: trunk/JSTests/ChangeLog (221077 => 221078)


--- trunk/JSTests/ChangeLog	2017-08-23 16:25:21 UTC (rev 221077)
+++ trunk/JSTests/ChangeLog	2017-08-23 16:28:29 UTC (rev 221078)
@@ -1,3 +1,13 @@
+2017-08-23  JF Bastien  <[email protected]>
+
+        Fix printing in test
+
+        Unreviewed: fixing verbosity, shouldn't have been there.
+
+        * wasm/regress/175693.js:
+        (else.else):
+        (catch):
+
 2017-08-18  Ryan Haddad  <[email protected]>
 
         Skip flaky JSC test microbenchmarks/generator-with-several-types.js.

Modified: trunk/JSTests/wasm/regress/175693.js (221077 => 221078)


--- trunk/JSTests/wasm/regress/175693.js	2017-08-23 16:25:21 UTC (rev 221077)
+++ trunk/JSTests/wasm/regress/175693.js	2017-08-23 16:28:29 UTC (rev 221078)
@@ -1,39 +1,46 @@
 const file = "175693.wasm";
 
+const verbose = false;
+
 if (typeof console === 'undefined') {
-  console = { log: print };
+    console = { log: print };
 }
 var binary;
 if (typeof process === 'object' && typeof require === 'function' /* node.js detection */) {
-  var args = process.argv.slice(2);
-  binary = require('fs').readFileSync(file);
-  if (!binary.buffer) binary = new Uint8Array(binary);
+    var args = process.argv.slice(2);
+    binary = require('fs').readFileSync(file);
+    if (!binary.buffer) binary = new Uint8Array(binary);
 } else {
-  var args;
-  if (typeof scriptArgs != 'undefined') {
-    args = scriptArgs;
-  } else if (typeof arguments != 'undefined') {
-    args = arguments;
-  }
-  if (typeof readbuffer === 'function') {
-    binary = new Uint8Array(readbuffer(file));
-  } else {
-    binary = read(file, 'binary');
-  }
+    var args;
+    if (typeof scriptArgs != 'undefined') {
+        args = scriptArgs;
+    } else if (typeof arguments != 'undefined') {
+        args = arguments;
+    }
+    if (typeof readbuffer === 'function') {
+        binary = new Uint8Array(readbuffer(file));
+    } else {
+        binary = read(file, 'binary');
+    }
 }
 var instance = new WebAssembly.Instance(new WebAssembly.Module(binary), {});
 if (instance.exports.hangLimitInitializer) instance.exports.hangLimitInitializer();
 try {
-  console.log('calling: func_0');
-instance.exports.func_0();
+    if (verbose)
+        console.log('calling: func_0');
+    instance.exports.func_0();
 } catch (e) {
-  console.log('   exception: ' + e);
+    if (verbose)
+        console.log('   exception: ' + e);
 }
 if (instance.exports.hangLimitInitializer) instance.exports.hangLimitInitializer();
 try {
-  console.log('calling: hangLimitInitializer');
-instance.exports.hangLimitInitializer();
+    if (verbose)
+        console.log('calling: hangLimitInitializer');
+    instance.exports.hangLimitInitializer();
 } catch (e) {
-  console.log('   exception: ' + e);
+    if (verbose)
+        console.log('   exception: ' + e);
 }
-console.log('done.')
+if (verbose)
+    console.log('done.')
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to