#include <vector>
#include <memory>
+#include <nncc/foundation/Memory.h>
+
#include <gtest/gtest.h>
+using nncc::foundation::make_unique;
+
namespace
{
class Conv2DTest : public ::testing::Test
ASSERT_EQ(op->ker(), nullptr);
ASSERT_EQ(obj->uses()->size(), 0);
}
+
+TEST_F(Conv2DTest, destructor)
+{
+ // Prepare a kernel object for testing
+ auto obj = obj_mgr.create(nncc::core::ADT::kernel::Shape{1, 1, 3, 3});
+
+ // Create 'Conv2D' op
+ auto op = make_unique<coco::Conv2D>();
+
+ op->ker(obj);
+
+ // Destroy 'Conv2D' op
+ op.reset();
+
+ ASSERT_EQ(obj->uses()->size(), 0);
+}