Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: sync/api/attachments/attachment_metadata_unittest.cc

Issue 982883002: [Sync] Add size and crc32c to AttachmentId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix argument evaluation order bug. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "sync/api/attachments/attachment_metadata.h" 5 #include "sync/api/attachments/attachment_metadata.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace syncer { 9 namespace syncer {
10 10
11 class AttachmentMetadataTest : public testing::Test {}; 11 class AttachmentMetadataTest : public testing::Test {};
12 12
13 TEST_F(AttachmentMetadataTest, Create) { 13 TEST_F(AttachmentMetadataTest, Create) {
14 AttachmentId id = AttachmentId::Create();
15 size_t size = 42; 14 size_t size = 42;
15 uint32_t crc32c = 2349829;
16 AttachmentId id = AttachmentId::Create(size, crc32c);
16 AttachmentMetadata metadata(id, size); 17 AttachmentMetadata metadata(id, size);
pavely 2015/03/07 00:07:25 Now AttachmentMetadata has size both in Id and as
maniscalco 2015/03/09 17:08:59 Done (added TODO to attachment_metadata.h).
17 EXPECT_EQ(metadata.GetId(), id); 18 EXPECT_EQ(metadata.GetId(), id);
18 EXPECT_EQ(metadata.GetSize(), size); 19 EXPECT_EQ(metadata.GetSize(), size);
19 } 20 }
20 21
21 } // namespace syncer 22 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698