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

Side by Side Diff: test/cctest/compiler/test-run-machops.cc

Issue 431963002: TF: Fix windows build (implicit cast between double and int32_t). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project 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 <functional> 5 #include <functional>
6 #include <limits> 6 #include <limits>
7 7
8 #include "test/cctest/cctest.h" 8 #include "test/cctest/cctest.h"
9 #include "test/cctest/compiler/codegen-tester.h" 9 #include "test/cctest/compiler/codegen-tester.h"
10 #include "test/cctest/compiler/value-helper.h" 10 #include "test/cctest/compiler/value-helper.h"
(...skipping 2927 matching lines...) Expand 10 before | Expand all | Expand 10 after
2938 int32_t expect = *i; 2938 int32_t expect = *i;
2939 CHECK_EQ(expect, m.Call()); 2939 CHECK_EQ(expect, m.Call());
2940 CHECK_EQ(expect, output); 2940 CHECK_EQ(expect, output);
2941 } 2941 }
2942 } 2942 }
2943 2943
2944 // Check various powers of 2. 2944 // Check various powers of 2.
2945 for (int32_t n = 1; n < 31; ++n) { 2945 for (int32_t n = 1; n < 31; ++n) {
2946 { 2946 {
2947 input = 1 << n; 2947 input = 1 << n;
2948 int32_t expect = input; 2948 int32_t expect = static_cast<int32_t>(input);
2949 CHECK_EQ(expect, m.Call()); 2949 CHECK_EQ(expect, m.Call());
2950 CHECK_EQ(expect, output); 2950 CHECK_EQ(expect, output);
2951 } 2951 }
2952 2952
2953 { 2953 {
2954 input = 3 << n; 2954 input = 3 << n;
2955 int32_t expect = input; 2955 int32_t expect = static_cast<int32_t>(input);
2956 CHECK_EQ(expect, m.Call()); 2956 CHECK_EQ(expect, m.Call());
2957 CHECK_EQ(expect, output); 2957 CHECK_EQ(expect, output);
2958 } 2958 }
2959 } 2959 }
2960 // Note we don't check fractional inputs, because these Convert operators 2960 // Note we don't check fractional inputs, because these Convert operators
2961 // really should be Change operators. 2961 // really should be Change operators.
2962 } 2962 }
2963 2963
2964 2964
2965 TEST(RunConvertFloat64ToUint32_B) { 2965 TEST(RunConvertFloat64ToUint32_B) {
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
3874 m.Return(one); 3874 m.Return(one);
3875 m.Call(); 3875 m.Call();
3876 for (int i = 0; i < kInputSize; i++) { 3876 for (int i = 0; i < kInputSize; i++) {
3877 CHECK_EQ(outputs[i], i + 2); 3877 CHECK_EQ(outputs[i], i + 2);
3878 } 3878 }
3879 } 3879 }
3880 3880
3881 #endif // MACHINE_ASSEMBLER_SUPPORTS_CALL_C 3881 #endif // MACHINE_ASSEMBLER_SUPPORTS_CALL_C
3882 3882
3883 #endif 3883 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698