Move and improve RefCounted

- Move RefCounted to common (from dawn_native) so that we can use
it from additional places.
- Use EXPECT_ macros instead of ASSERT_ in RefCounted tests for
improved logging on failures.
- Add a missing test for Ref::Detach.
- Plug memory leak in RaceOnReferenceRelease

Change-Id: Iaa7b11b5a6fa146e3c322143279a21a4ac027547
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19903
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
This commit is contained in:
Rafael Cintron
2020-04-20 17:36:22 +00:00
committed by Commit Bot service account
parent 8edb723dea
commit 7e8385c183
19 changed files with 289 additions and 280 deletions

View File

@@ -14,7 +14,7 @@
#include <gtest/gtest.h>
#include "dawn_native/RefCounted.h"
#include "common/RefCounted.h"
#include "dawn_native/ToBackend.h"
#include <type_traits>