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
|