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

Side by Side Diff: runtime/vm/utils_test.cc

Issue 9209001: Move utils.h and utils.cc from runtime/vm to runtime/platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from iposva@ and ager@ Created 8 years, 11 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 #include "platform/utils.h"
6 #include "vm/unit_test.h" 7 #include "vm/unit_test.h"
7 #include "vm/utils.h"
8 8
9 namespace dart { 9 namespace dart {
10 10
11 UNIT_TEST_CASE(Minimum) { 11 UNIT_TEST_CASE(Minimum) {
12 EXPECT_EQ(0, Utils::Minimum(0, 1)); 12 EXPECT_EQ(0, Utils::Minimum(0, 1));
13 EXPECT_EQ(0, Utils::Minimum(1, 0)); 13 EXPECT_EQ(0, Utils::Minimum(1, 0));
14 14
15 EXPECT_EQ(1, Utils::Minimum(1, 2)); 15 EXPECT_EQ(1, Utils::Minimum(1, 2));
16 EXPECT_EQ(1, Utils::Minimum(2, 1)); 16 EXPECT_EQ(1, Utils::Minimum(2, 1));
17 17
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 UNIT_TEST_CASE(LowBits) { 162 UNIT_TEST_CASE(LowBits) {
163 EXPECT_EQ(0xff00, Utils::Low16Bits(0xffff00)); 163 EXPECT_EQ(0xff00, Utils::Low16Bits(0xffff00));
164 EXPECT_EQ(0xff, Utils::High16Bits(0xffff00)); 164 EXPECT_EQ(0xff, Utils::High16Bits(0xffff00));
165 EXPECT_EQ(0xff00, Utils::Low32Bits(0xff0000ff00LL)); 165 EXPECT_EQ(0xff00, Utils::Low32Bits(0xff0000ff00LL));
166 EXPECT_EQ(0xff, Utils::High32Bits(0xff0000ff00LL)); 166 EXPECT_EQ(0xff, Utils::High32Bits(0xff0000ff00LL));
167 EXPECT_EQ(0x00ff0000ff00LL, Utils::LowHighTo64Bits(0xff00, 0x00ff)); 167 EXPECT_EQ(0x00ff0000ff00LL, Utils::LowHighTo64Bits(0xff00, 0x00ff));
168 } 168 }
169 169
170 } // namespace dart 170 } // namespace dart
OLDNEW
« runtime/vm/isolate.cc ('K') | « runtime/vm/utils.cc ('k') | runtime/vm/virtual_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698