Add offset argument in BufferZeroInit mapping test

The CL that added offset/size args landed about the same time
as the CL that adding zero init mapping tests (without the args).

Tbr=cwallez@chromium.org
Bug: dawn:445, dawn:414

Change-Id: I388399d425c3a3c12be79b160686caaf3d81a89c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25162
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng 2020-07-18 00:22:27 +00:00 committed by Commit Bot service account
parent f6e7044697
commit 4a4c76b8b5
1 changed files with 2 additions and 1 deletions

View File

@ -312,7 +312,8 @@ TEST_P(BufferZeroInitTest, MapReadAsync) {
constexpr uint64_t kSize = 8u;
EXPECT_LAZY_CLEAR(1u, MapAsyncAndWait(buffer, kMapMode, kOffset, kSize));
const uint32_t* mappedDataUint = static_cast<const uint32_t*>(buffer.GetConstMappedRange());
const uint32_t* mappedDataUint =
static_cast<const uint32_t*>(buffer.GetConstMappedRange(kOffset));
for (uint32_t i = 0; i < kSize / sizeof(uint32_t); ++i) {
EXPECT_EQ(0u, mappedDataUint[i]);
}