Welcome to mirror list, hosted at ThFree Co, Russian Federation.

garbage-collected_unittest.cc « cppgc « heap « unittests « test « v8 « deps - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5098bdf48e1319ba6595429be889b584033918ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "include/cppgc/garbage-collected.h"

#include "testing/gtest/include/gtest/gtest.h"

namespace cppgc {
namespace internal {

namespace {

class GCed : public GarbageCollected<GCed> {};
class NotGCed {};

}  // namespace

TEST(GarbageCollectedTest, GarbageCollectedTrait) {
  EXPECT_FALSE(IsGarbageCollectedType<int>::value);
  EXPECT_FALSE(IsGarbageCollectedType<NotGCed>::value);
  EXPECT_TRUE(IsGarbageCollectedType<GCed>::value);
}

}  // namespace internal
}  // namespace cppgc