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

Side by Side Diff: sql/meta_table_unittest.cc

Issue 218953003: Remove all uses of GG_LONGLONG and GG_ULONGLONG. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win? Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/base/int128_unittest.cc ('k') | ui/events/gestures/velocity_calculator_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "sql/meta_table.h" 5 #include "sql/meta_table.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "sql/connection.h" 9 #include "sql/connection.h"
10 #include "sql/statement.h" 10 #include "sql/statement.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 EXPECT_TRUE(meta_table.Init(&db(), 1, 1)); 203 EXPECT_TRUE(meta_table.Init(&db(), 1, 1));
204 204
205 int value; 205 int value;
206 EXPECT_TRUE(meta_table.GetValue(kKey, &value)); 206 EXPECT_TRUE(meta_table.GetValue(kKey, &value));
207 EXPECT_EQ(kSecondValue, value); 207 EXPECT_EQ(kSecondValue, value);
208 } 208 }
209 } 209 }
210 210
211 TEST_F(SQLMetaTableTest, Int64Value) { 211 TEST_F(SQLMetaTableTest, Int64Value) {
212 const char kKey[] = "Int Key"; 212 const char kKey[] = "Int Key";
213 const int64 kFirstValue = GG_LONGLONG(5000000017); 213 const int64 kFirstValue = 5000000017LL;
214 const int64 kSecondValue = GG_LONGLONG(5000000023); 214 const int64 kSecondValue = 5000000023LL;
215 215
216 // Initially, the value isn't there until set. 216 // Initially, the value isn't there until set.
217 { 217 {
218 sql::MetaTable meta_table; 218 sql::MetaTable meta_table;
219 EXPECT_TRUE(meta_table.Init(&db(), 1, 1)); 219 EXPECT_TRUE(meta_table.Init(&db(), 1, 1));
220 220
221 int64 value; 221 int64 value;
222 EXPECT_FALSE(meta_table.GetValue(kKey, &value)); 222 EXPECT_FALSE(meta_table.GetValue(kKey, &value));
223 223
224 EXPECT_TRUE(meta_table.SetValue(kKey, kFirstValue)); 224 EXPECT_TRUE(meta_table.SetValue(kKey, kFirstValue));
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 EXPECT_TRUE(meta_table.SetValue(kKey, kValue)); 264 EXPECT_TRUE(meta_table.SetValue(kKey, kValue));
265 EXPECT_TRUE(meta_table.GetValue(kKey, &value)); 265 EXPECT_TRUE(meta_table.GetValue(kKey, &value));
266 EXPECT_EQ(kValue, value); 266 EXPECT_EQ(kValue, value);
267 267
268 // After delete value isn't present. 268 // After delete value isn't present.
269 EXPECT_TRUE(meta_table.DeleteKey(kKey)); 269 EXPECT_TRUE(meta_table.DeleteKey(kKey));
270 EXPECT_FALSE(meta_table.GetValue(kKey, &value)); 270 EXPECT_FALSE(meta_table.GetValue(kKey, &value));
271 } 271 }
272 272
273 } // namespace 273 } // namespace
OLDNEW
« no previous file with comments | « net/base/int128_unittest.cc ('k') | ui/events/gestures/velocity_calculator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698