/* * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once #include "shared/test/common/test_macros/test.h" namespace NEO { template struct DestructorCounted : public BaseType { template DestructorCounted(uint32_t &destructorId, Args &&...args) : BaseType(std::forward(args)...), destructorId(destructorId) {} ~DestructorCounted() override { EXPECT_EQ(ordinal, destructorId); destructorId++; } private: uint32_t &destructorId; }; } // namespace NEO