diff options
-rw-r--r-- | src/glsl/tests/uniform_initializer_utils.cpp | 2 | ||||
-rw-r--r-- | src/glx/tests/clientinfo_unittest.cpp | 40 | ||||
-rw-r--r-- | src/glx/tests/create_context_unittest.cpp | 14 |
3 files changed, 28 insertions, 28 deletions
diff --git a/src/glsl/tests/uniform_initializer_utils.cpp b/src/glsl/tests/uniform_initializer_utils.cpp index 4794169a6eb..e7d274e2a88 100644 --- a/src/glsl/tests/uniform_initializer_utils.cpp +++ b/src/glsl/tests/uniform_initializer_utils.cpp @@ -201,7 +201,7 @@ verify_data(gl_constant_value *storage, unsigned storage_array_size, red_zone_size)); } } else { - ASSERT_EQ(0, storage_array_size); + ASSERT_EQ(0u, storage_array_size); for (unsigned i = 0; i < val->type->components(); i++) { switch (val->type->base_type) { case GLSL_TYPE_UINT: diff --git a/src/glx/tests/clientinfo_unittest.cpp b/src/glx/tests/clientinfo_unittest.cpp index f599c833a66..b56c94be42e 100644 --- a/src/glx/tests/clientinfo_unittest.cpp +++ b/src/glx/tests/clientinfo_unittest.cpp @@ -523,7 +523,7 @@ TEST_F(glX_send_client_info_test, sends_correct_gl_extension_string) create_single_screen_display(1, 1, ""); __glX_send_client_info(this->glx_dpy); - ASSERT_EQ(sizeof(ext), gl_ext_length); + ASSERT_EQ((int) sizeof(ext), gl_ext_length); ASSERT_NE((char *) 0, gl_ext_string); EXPECT_EQ(0, memcmp(gl_ext_string, ext, sizeof(ext))); } @@ -537,26 +537,26 @@ TEST_F(glX_send_client_info_test, gl_versions_are_sane) unsigned versions_below_3_0 = 0; for (int i = 0; i < num_gl_versions; i++) { - EXPECT_LT(0, gl_versions[i * 2]); - EXPECT_GE(4, gl_versions[i * 2]); + EXPECT_LT(0u, gl_versions[i * 2]); + EXPECT_GE(4u, gl_versions[i * 2]); /* Verify that the minor version advertised with the major version makes * sense. */ switch (gl_versions[i * 2]) { case 1: - EXPECT_GE(5, gl_versions[i * 2 + 1]); + EXPECT_GE(5u, gl_versions[i * 2 + 1]); versions_below_3_0++; break; case 2: - EXPECT_GE(1, gl_versions[i * 2 + 1]); + EXPECT_GE(1u, gl_versions[i * 2 + 1]); versions_below_3_0++; break; case 3: - EXPECT_GE(3, gl_versions[i * 2 + 1]); + EXPECT_GE(3u, gl_versions[i * 2 + 1]); break; case 4: - EXPECT_GE(2, gl_versions[i * 2 + 1]); + EXPECT_GE(2u, gl_versions[i * 2 + 1]); break; } } @@ -566,7 +566,7 @@ TEST_F(glX_send_client_info_test, gl_versions_are_sane) * "Only the highest supported version below 3.0 should be sent, since * OpenGL 2.1 is backwards compatible with all earlier versions." */ - EXPECT_LE(versions_below_3_0, 1); + EXPECT_LE(versions_below_3_0, 1u); } TEST_F(glX_send_client_info_test, gl_versions_and_profiles_are_sane) @@ -582,37 +582,37 @@ TEST_F(glX_send_client_info_test, gl_versions_and_profiles_are_sane) unsigned versions_below_3_0 = 0; for (int i = 0; i < num_gl_versions; i++) { - EXPECT_LT(0, gl_versions[i * 3]); - EXPECT_GE(4, gl_versions[i * 3]); + EXPECT_LT(0u, gl_versions[i * 3]); + EXPECT_GE(4u, gl_versions[i * 3]); /* Verify that the minor version advertised with the major version makes * sense. */ switch (gl_versions[i * 3]) { case 1: - EXPECT_GE(5, gl_versions[i * 3 + 1]); - EXPECT_EQ(0, gl_versions[i * 3 + 2]); + EXPECT_GE(5u, gl_versions[i * 3 + 1]); + EXPECT_EQ(0u, gl_versions[i * 3 + 2]); versions_below_3_0++; break; case 2: - EXPECT_GE(1, gl_versions[i * 3 + 1]); - EXPECT_EQ(0, gl_versions[i * 3 + 2]); + EXPECT_GE(1u, gl_versions[i * 3 + 1]); + EXPECT_EQ(0u, gl_versions[i * 3 + 2]); versions_below_3_0++; break; case 3: - EXPECT_GE(3, gl_versions[i * 3 + 1]); + EXPECT_GE(3u, gl_versions[i * 3 + 1]); /* Profiles were not introduced until OpenGL 3.2. */ if (gl_versions[i * 3 + 1] < 2) { - EXPECT_EQ(0, gl_versions[i * 3 + 2]); + EXPECT_EQ(0u, gl_versions[i * 3 + 2]); } else { - EXPECT_EQ(0, gl_versions[i * 3 + 2] & ~all_valid_bits); + EXPECT_EQ(0u, gl_versions[i * 3 + 2] & ~all_valid_bits); } break; case 4: - EXPECT_GE(2, gl_versions[i * 3 + 1]); - EXPECT_EQ(0, gl_versions[i * 3 + 2] & ~all_valid_bits); + EXPECT_GE(2u, gl_versions[i * 3 + 1]); + EXPECT_EQ(0u, gl_versions[i * 3 + 2] & ~all_valid_bits); break; } } @@ -622,7 +622,7 @@ TEST_F(glX_send_client_info_test, gl_versions_and_profiles_are_sane) * "Only the highest supported version below 3.0 should be sent, since * OpenGL 2.1 is backwards compatible with all earlier versions." */ - EXPECT_LE(versions_below_3_0, 1); + EXPECT_LE(versions_below_3_0, 1u); } TEST_F(glX_send_client_info_test, glx_version_is_1_4_for_1_1) diff --git a/src/glx/tests/create_context_unittest.cpp b/src/glx/tests/create_context_unittest.cpp index f97ec7ca5f2..fb3e9440a8a 100644 --- a/src/glx/tests/create_context_unittest.cpp +++ b/src/glx/tests/create_context_unittest.cpp @@ -210,7 +210,7 @@ TEST_F(glXCreateContextAttribARB_test, sent_correct_context) glXCreateContextAttribsARB(this->dpy, (GLXFBConfig) &this->fbc, 0, False, NULL); - EXPECT_EQ(99, req.context); + EXPECT_EQ(99u, req.context); } TEST_F(glXCreateContextAttribARB_test, sent_correct_fbconfig) @@ -280,7 +280,7 @@ TEST_F(glXCreateContextAttribARB_test, sent_correct_screen) glXCreateContextAttribsARB(this->dpy, (GLXFBConfig) &this->fbc, 0, False, NULL); - EXPECT_EQ(7, req.screen); + EXPECT_EQ(7u, req.screen); } TEST_F(glXCreateContextAttribARB_test, sent_correct_num_attribs) @@ -303,7 +303,7 @@ TEST_F(glXCreateContextAttribARB_test, sent_correct_num_attribs) glXCreateContextAttribsARB(this->dpy, (GLXFBConfig) &this->fbc, 0, False, attribs); - EXPECT_EQ(4, req.num_attribs); + EXPECT_EQ(4u, req.num_attribs); } TEST_F(glXCreateContextAttribARB_test, sent_correct_num_attribs_empty_list) @@ -315,7 +315,7 @@ TEST_F(glXCreateContextAttribARB_test, sent_correct_num_attribs_empty_list) glXCreateContextAttribsARB(this->dpy, (GLXFBConfig) &this->fbc, 0, False, attribs); - EXPECT_EQ(0, req.num_attribs); + EXPECT_EQ(0u, req.num_attribs); } TEST_F(glXCreateContextAttribARB_test, sent_correct_num_attribs_NULL_list_pointer) @@ -323,7 +323,7 @@ TEST_F(glXCreateContextAttribARB_test, sent_correct_num_attribs_NULL_list_pointe glXCreateContextAttribsARB(this->dpy, (GLXFBConfig) &this->fbc, 0, False, NULL); - EXPECT_EQ(0, req.num_attribs); + EXPECT_EQ(0u, req.num_attribs); } TEST_F(glXCreateContextAttribARB_test, sent_correct_attrib_list) @@ -339,7 +339,7 @@ TEST_F(glXCreateContextAttribARB_test, sent_correct_attrib_list) False, attribs); for (unsigned i = 0; i < 6; i++) { - EXPECT_EQ(attribs[i], sent_attribs[i]); + EXPECT_EQ((uint32_t) attribs[i], sent_attribs[i]); } } /*@}*/ @@ -376,7 +376,7 @@ TEST_F(glXCreateContextAttribARB_test, correct_context_xid) ASSERT_NE((GLXContext)0, ctx); struct glx_context *glx_ctx = (struct glx_context *) ctx; - EXPECT_EQ(99, glx_ctx->xid); + EXPECT_EQ(99u, glx_ctx->xid); } TEST_F(glXCreateContextAttribARB_test, correct_context_share_xid) |