mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
Rename src/common macros NXT_* to DAWN_*
This commit is contained in:
committed by
Corentin Wallez
parent
33ca49614d
commit
83a9c9d6d9
@@ -129,10 +129,10 @@ bool gTestUsesWire = false;
|
||||
|
||||
void NXTTest::SetUp() {
|
||||
mBinding = utils::CreateBinding(ParamToBackendType(GetParam()));
|
||||
NXT_ASSERT(mBinding != nullptr);
|
||||
DAWN_ASSERT(mBinding != nullptr);
|
||||
|
||||
GLFWwindow* testWindow = GetWindowForBackend(mBinding, GetParam());
|
||||
NXT_ASSERT(testWindow != nullptr);
|
||||
DAWN_ASSERT(testWindow != nullptr);
|
||||
|
||||
mBinding->SetWindow(testWindow);
|
||||
|
||||
@@ -323,7 +323,7 @@ void NXTTest::MapSlotsSynchronously() {
|
||||
void NXTTest::SlotMapReadCallback(nxtBufferMapAsyncStatus status,
|
||||
const void* data,
|
||||
nxtCallbackUserdata userdata_) {
|
||||
NXT_ASSERT(status == NXT_BUFFER_MAP_ASYNC_STATUS_SUCCESS);
|
||||
DAWN_ASSERT(status == NXT_BUFFER_MAP_ASYNC_STATUS_SUCCESS);
|
||||
|
||||
auto userdata = reinterpret_cast<MapReadUserdata*>(static_cast<uintptr_t>(userdata_));
|
||||
userdata->test->mReadbackSlots[userdata->slot].mappedData = data;
|
||||
@@ -334,7 +334,7 @@ void NXTTest::SlotMapReadCallback(nxtBufferMapAsyncStatus status,
|
||||
|
||||
void NXTTest::ResolveExpectations() {
|
||||
for (const auto& expectation : mDeferredExpectations) {
|
||||
NXT_ASSERT(mReadbackSlots[expectation.readbackSlot].mappedData != nullptr);
|
||||
DAWN_ASSERT(mReadbackSlots[expectation.readbackSlot].mappedData != nullptr);
|
||||
|
||||
// Get a pointer to the mapped copy of the data for the expectation.
|
||||
const char* data = reinterpret_cast<const char*>(mReadbackSlots[expectation.readbackSlot].mappedData);
|
||||
@@ -343,7 +343,7 @@ void NXTTest::ResolveExpectations() {
|
||||
uint32_t size;
|
||||
std::vector<char> packedData;
|
||||
if (expectation.rowBytes != expectation.rowPitch) {
|
||||
NXT_ASSERT(expectation.rowPitch > expectation.rowBytes);
|
||||
DAWN_ASSERT(expectation.rowPitch > expectation.rowBytes);
|
||||
uint32_t rowCount = (expectation.size + expectation.rowPitch - 1) / expectation.rowPitch;
|
||||
uint32_t packedSize = rowCount * expectation.rowBytes;
|
||||
packedData.resize(packedSize);
|
||||
@@ -436,7 +436,7 @@ namespace detail {
|
||||
|
||||
template<typename T>
|
||||
testing::AssertionResult ExpectEq<T>::Check(const void* data, size_t size) {
|
||||
NXT_ASSERT(size == sizeof(T) * mExpected.size());
|
||||
DAWN_ASSERT(size == sizeof(T) * mExpected.size());
|
||||
|
||||
const T* actual = reinterpret_cast<const T*>(data);
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ class InputStateTest : public NXTTest {
|
||||
case VertexFormat::FloatR32:
|
||||
return component >= 1;
|
||||
default:
|
||||
NXT_UNREACHABLE();
|
||||
DAWN_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ TEST_F(BitSetIteratorTest, EmptySet) {
|
||||
// causing an unreachable code warning in MSVS
|
||||
bool sawBit = false;
|
||||
for (unsigned long bit : IterateBitSet(mStateBits)) {
|
||||
NXT_UNUSED(bit);
|
||||
DAWN_UNUSED(bit);
|
||||
sawBit = true;
|
||||
}
|
||||
EXPECT_FALSE(sawBit);
|
||||
|
||||
@@ -178,7 +178,7 @@ TEST(ErrorTests, TRY_RESULT_Error) {
|
||||
auto Try = [ReturnError]() -> ResultOrError<int*> {
|
||||
int* result = nullptr;
|
||||
DAWN_TRY_ASSIGN(result, ReturnError());
|
||||
NXT_UNUSED(result);
|
||||
DAWN_UNUSED(result);
|
||||
|
||||
// DAWN_TRY should return before this point
|
||||
EXPECT_FALSE(true);
|
||||
@@ -233,7 +233,7 @@ TEST(ErrorTests, TRY_RESULT_ConversionToError) {
|
||||
auto Try = [ReturnError]() -> MaybeError {
|
||||
int* result = nullptr;
|
||||
DAWN_TRY_ASSIGN(result, ReturnError());
|
||||
NXT_UNUSED(result);
|
||||
DAWN_UNUSED(result);
|
||||
|
||||
return {};
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ TEST(SerialQueue, BasicTest) {
|
||||
|
||||
// Iterating on empty queue 1) works 2) doesn't produce any values
|
||||
for (int value : queue.IterateAll()) {
|
||||
NXT_UNUSED(value);
|
||||
DAWN_UNUSED(value);
|
||||
ASSERT_TRUE(false);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ TEST(SerialQueue, BasicTest) {
|
||||
ASSERT_TRUE(queue.Empty());
|
||||
|
||||
for (int value : queue.IterateAll()) {
|
||||
NXT_UNUSED(value);
|
||||
DAWN_UNUSED(value);
|
||||
ASSERT_TRUE(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user