/* * Copyright (C) 2018 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once #include "test.h" namespace OCLRT { 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 OCLRT