From 4a4c76b8b5fc04dca23add28d884fe7f5c419657 Mon Sep 17 00:00:00 2001 From: Austin Eng Date: Sat, 18 Jul 2020 00:22:27 +0000 Subject: [PATCH] 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 Reviewed-by: Austin Eng Commit-Queue: Austin Eng --- src/tests/end2end/BufferZeroInitTests.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/end2end/BufferZeroInitTests.cpp b/src/tests/end2end/BufferZeroInitTests.cpp index 52d172f29f..fa09f2102c 100644 --- a/src/tests/end2end/BufferZeroInitTests.cpp +++ b/src/tests/end2end/BufferZeroInitTests.cpp @@ -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(buffer.GetConstMappedRange()); + const uint32_t* mappedDataUint = + static_cast(buffer.GetConstMappedRange(kOffset)); for (uint32_t i = 0; i < kSize / sizeof(uint32_t); ++i) { EXPECT_EQ(0u, mappedDataUint[i]); }