mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Missed formatting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208362 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -221,17 +221,18 @@ TEST_F(StringMapTest, NonDefaultConstructable) {
|
||||
struct MoveOnly {
|
||||
int i;
|
||||
MoveOnly(int i) : i(i) {}
|
||||
MoveOnly(MoveOnly&&) = default;
|
||||
MoveOnly(const MoveOnly&) = delete;
|
||||
MoveOnly &operator=(MoveOnly&&) = default;
|
||||
MoveOnly &operator=(const MoveOnly&) = delete;
|
||||
MoveOnly(MoveOnly &&) = default;
|
||||
MoveOnly(const MoveOnly &) = delete;
|
||||
MoveOnly &operator=(MoveOnly &&) = default;
|
||||
MoveOnly &operator=(const MoveOnly &) = delete;
|
||||
};
|
||||
|
||||
TEST_F(StringMapTest, MoveOnlyKey) {
|
||||
StringMap<MoveOnly> t;
|
||||
t.GetOrCreateValue("Test", MoveOnly(42));
|
||||
StringRef Key = "Test";
|
||||
StringMapEntry<MoveOnly>::Create(Key.begin(), Key.end(), MoveOnly(42))->Destroy();
|
||||
StringMapEntry<MoveOnly>::Create(Key.begin(), Key.end(), MoveOnly(42))
|
||||
->Destroy();
|
||||
}
|
||||
|
||||
TEST_F(StringMapTest, MoveConstruct) {
|
||||
@ -259,24 +260,23 @@ TEST_F(StringMapTest, MoveAssignment) {
|
||||
struct Countable {
|
||||
int &InstanceCount;
|
||||
int Number;
|
||||
Countable(int Number, int &InstanceCount) :InstanceCount(InstanceCount), Number(Number) {
|
||||
Countable(int Number, int &InstanceCount)
|
||||
: InstanceCount(InstanceCount), Number(Number) {
|
||||
++InstanceCount;
|
||||
}
|
||||
Countable(Countable &&C) : InstanceCount(C.InstanceCount), Number(C.Number) {
|
||||
++InstanceCount;
|
||||
C.Number = -1;
|
||||
}
|
||||
Countable(const Countable &C) : InstanceCount(C.InstanceCount), Number(C.Number) {
|
||||
Countable(const Countable &C)
|
||||
: InstanceCount(C.InstanceCount), Number(C.Number) {
|
||||
++InstanceCount;
|
||||
}
|
||||
Countable &operator=(Countable C) {
|
||||
Number = C.Number;
|
||||
return *this;
|
||||
}
|
||||
~Countable() {
|
||||
--InstanceCount;
|
||||
}
|
||||
|
||||
~Countable() { --InstanceCount; }
|
||||
};
|
||||
|
||||
TEST_F(StringMapTest, MoveDtor) {
|
||||
|
Reference in New Issue
Block a user