| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/pickle.h" | 5 #include "base/pickle.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 } | 658 } |
| 659 { | 659 { |
| 660 TestingPickle pickle; | 660 TestingPickle pickle; |
| 661 base::PickleSizer sizer; | 661 base::PickleSizer sizer; |
| 662 pickle.WriteBytes(testdata, testdatalen); | 662 pickle.WriteBytes(testdata, testdatalen); |
| 663 sizer.AddBytes(testdatalen); | 663 sizer.AddBytes(testdatalen); |
| 664 EXPECT_EQ(sizer.payload_size(), pickle.payload_size()); | 664 EXPECT_EQ(sizer.payload_size(), pickle.payload_size()); |
| 665 } | 665 } |
| 666 } | 666 } |
| 667 | 667 |
| 668 TEST(PickleTest, SelfSwap) { |
| 669 TestingPickle pickle; |
| 670 std::swap(pickle, pickle); |
| 671 } |
| 672 |
| 668 } // namespace base | 673 } // namespace base |
| OLD | NEW |