From 1ec7056f38cdb7a28c72ff835ae9e60b146b1066 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Wed, 21 Jul 2021 14:53:58 -0400 Subject: [PATCH] chore: migrate $ERROR -> throw new Test262Error in test/built-ins/Atomics (#3077) --- test/built-ins/Atomics/notify/bigint/null-bufferdata-throws.js | 2 +- test/built-ins/Atomics/notify/null-bufferdata-throws.js | 2 +- test/built-ins/Atomics/wait/bigint/null-bufferdata-throws.js | 2 +- test/built-ins/Atomics/wait/null-bufferdata-throws.js | 2 +- .../Atomics/waitAsync/bigint/null-bufferdata-throws.js | 2 +- test/built-ins/Atomics/waitAsync/null-bufferdata-throws.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/built-ins/Atomics/notify/bigint/null-bufferdata-throws.js b/test/built-ins/Atomics/notify/bigint/null-bufferdata-throws.js index 721a967c72..f47804cc3c 100644 --- a/test/built-ins/Atomics/notify/bigint/null-bufferdata-throws.js +++ b/test/built-ins/Atomics/notify/bigint/null-bufferdata-throws.js @@ -28,7 +28,7 @@ const poisoned = { try { $DETACHBUFFER(i64a.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null } catch (error) { - $ERROR(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`); + throw new Test262Error(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`); } assert.throws(TypeError, function() { diff --git a/test/built-ins/Atomics/notify/null-bufferdata-throws.js b/test/built-ins/Atomics/notify/null-bufferdata-throws.js index 761c359826..46f8504b94 100644 --- a/test/built-ins/Atomics/notify/null-bufferdata-throws.js +++ b/test/built-ins/Atomics/notify/null-bufferdata-throws.js @@ -35,7 +35,7 @@ const poisoned = { try { $DETACHBUFFER(i32a.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null } catch (error) { - $ERROR(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`); + throw new Test262Error(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`); } assert.throws(TypeError, function() { diff --git a/test/built-ins/Atomics/wait/bigint/null-bufferdata-throws.js b/test/built-ins/Atomics/wait/bigint/null-bufferdata-throws.js index 431776621a..e1fb418d91 100644 --- a/test/built-ins/Atomics/wait/bigint/null-bufferdata-throws.js +++ b/test/built-ins/Atomics/wait/bigint/null-bufferdata-throws.js @@ -37,7 +37,7 @@ const poisoned = { try { $DETACHBUFFER(i64a.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null } catch (error) { - $ERROR(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`); + throw new Test262Error(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`); } assert.throws(TypeError, function() { diff --git a/test/built-ins/Atomics/wait/null-bufferdata-throws.js b/test/built-ins/Atomics/wait/null-bufferdata-throws.js index fa83cedf6d..3747df7a8d 100644 --- a/test/built-ins/Atomics/wait/null-bufferdata-throws.js +++ b/test/built-ins/Atomics/wait/null-bufferdata-throws.js @@ -35,7 +35,7 @@ const poisoned = { try { $DETACHBUFFER(i32a.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null } catch (error) { - $ERROR(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`); + throw new Test262Error(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`); } assert.throws(TypeError, function() { diff --git a/test/built-ins/Atomics/waitAsync/bigint/null-bufferdata-throws.js b/test/built-ins/Atomics/waitAsync/bigint/null-bufferdata-throws.js index 005ef96599..f9607f04fa 100644 --- a/test/built-ins/Atomics/waitAsync/bigint/null-bufferdata-throws.js +++ b/test/built-ins/Atomics/waitAsync/bigint/null-bufferdata-throws.js @@ -39,7 +39,7 @@ const poisoned = { try { $DETACHBUFFER(i64a.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null } catch (error) { - $ERROR(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`); + throw new Test262Error(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`); } assert.throws(TypeError, function() { diff --git a/test/built-ins/Atomics/waitAsync/null-bufferdata-throws.js b/test/built-ins/Atomics/waitAsync/null-bufferdata-throws.js index 548357dbb8..08f03718da 100644 --- a/test/built-ins/Atomics/waitAsync/null-bufferdata-throws.js +++ b/test/built-ins/Atomics/waitAsync/null-bufferdata-throws.js @@ -39,7 +39,7 @@ const poisoned = { try { $DETACHBUFFER(i32a.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null } catch (error) { - $ERROR(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`); + throw new Test262Error(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`); } assert.throws(TypeError, function() {