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

Unified Diff: base/android/jni_array_unittest.cc

Issue 1471693006: Remove kint32min. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint3
Patch Set: rebase Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/basictypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/jni_array_unittest.cc
diff --git a/base/android/jni_array_unittest.cc b/base/android/jni_array_unittest.cc
index f81014e8bdcf7c94d90de3406d0841a3d3f4f249..755c10ef2510d1a1cb9854be3606a2785f984871 100644
--- a/base/android/jni_array_unittest.cc
+++ b/base/android/jni_array_unittest.cc
@@ -4,6 +4,10 @@
#include "base/android/jni_array.h"
+#include <stdint.h>
+
+#include <limits>
+
#include "base/android/jni_android.h"
#include "base/android/scoped_java_ref.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -57,7 +61,8 @@ void CheckIntConversion(
}
TEST(JniArray, IntConversions) {
- const int kInts[] = { 0, 1, -1, kint32min, kint32max};
+ const int kInts[] = {0, 1, -1, std::numeric_limits<int32_t>::min(),
+ std::numeric_limits<int32_t>::max()};
const size_t kLen = arraysize(kInts);
JNIEnv* env = AttachCurrentThread();
@@ -258,7 +263,8 @@ TEST(JniArray, JavaArrayOfIntArrayToIntVector) {
ASSERT_TRUE(array.obj());
// Populate int[][] object.
- const int kInts0[] = {0, 1, -1, kint32min, kint32max};
+ const int kInts0[] = {0, 1, -1, std::numeric_limits<int32_t>::min(),
+ std::numeric_limits<int32_t>::max()};
const size_t kLen0 = arraysize(kInts0);
ScopedJavaLocalRef<jintArray> int_array0 = ToJavaIntArray(env, kInts0, kLen0);
env->SetObjectArrayElement(array.obj(), 0, int_array0.obj());
« no previous file with comments | « no previous file | base/basictypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698