Skip to content

Commit

Permalink
Replace assert_precondition with assert_equals in native-io/ (web-pla…
Browse files Browse the repository at this point in the history
…tform-tests#23023)

assert_precondition is deprecated (see
https://github.com/web-platform-tests/rfcs/blob/master/rfcs/assert_precondition_rename.md).
The usage in these tests was to check equality rather than whether a
feature was supported, so replace with assert_equals.
  • Loading branch information
stephenmcgruer authored Apr 20, 2020
1 parent f4f991a commit 9b5bded
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion native-io/close_async.tentative.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function createFile(testCase, fileName) {
const writtenBytes = new Uint8Array(writeSharedArrayBuffer);
writtenBytes.set([64, 65, 66, 67]);
const writeCount = await file.write(writtenBytes, 0);
assert_precondition(writeCount == 4);
assert_equals(writeCount, 4);

return file;
}
Expand Down
2 changes: 1 addition & 1 deletion native-io/close_sync.tentative.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function createFileSync(testCase, fileName) {

const writtenBytes = Uint8Array.from([64, 65, 66, 67]);
const writeCount = file.write(writtenBytes, 0);
assert_precondition(writeCount == 4);
assert_equals(writeCount, 4);

return file;
}
Expand Down
2 changes: 1 addition & 1 deletion native-io/concurrent_io_async.tentative.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function createFile(testCase, fileName) {
const writtenBytes = new Uint8Array(writeSharedArrayBuffer);
writtenBytes.set([64, 65, 66, 67]);
const writeCount = await file.write(writtenBytes, 0);
assert_precondition(writeCount == 4);
assert_equals(writeCount, 4);

return file;
}
Expand Down

0 comments on commit 9b5bded

Please sign in to comment.