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

Unified Diff: gpu/command_buffer/common/gles2_cmd_utils_unittest.cc

Issue 7304002: Correct reporting of compressed texture formats and shader binary formats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
diff --git a/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc b/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
index 3a1da0ae93ea4dc9a1307823043d797c5b3a9b0a..0923616c982da8041b10b56edb92caa684c2f512 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
@@ -14,15 +14,27 @@ namespace gpu {
namespace gles2 {
class GLES2UtilTest : public testing:: Test {
- public:
- GLES2UtilTest()
- : util_(0) {
- }
-
protected:
GLES2Util util_;
};
+TEST_F(GLES2UtilTest, GLGetNumValuesReturned) {
+ EXPECT_EQ(0, util_.GLGetNumValuesReturned(GL_COMPRESSED_TEXTURE_FORMATS));
+ EXPECT_EQ(0, util_.GLGetNumValuesReturned(GL_SHADER_BINARY_FORMATS));
+
+ EXPECT_EQ(0, util_.num_compressed_texture_formats());
+ EXPECT_EQ(0, util_.num_shader_binary_formats());
+
+ util_.set_num_compressed_texture_formats(1);
+ util_.set_num_shader_binary_formats(2);
+
+ EXPECT_EQ(1, util_.GLGetNumValuesReturned(GL_COMPRESSED_TEXTURE_FORMATS));
+ EXPECT_EQ(2, util_.GLGetNumValuesReturned(GL_SHADER_BINARY_FORMATS));
+
+ EXPECT_EQ(1, util_.num_compressed_texture_formats());
+ EXPECT_EQ(2, util_.num_shader_binary_formats());
+}
+
TEST_F(GLES2UtilTest, ComputeImageDataSizeFormats) {
const uint32 kWidth = 16;
const uint32 kHeight = 12;
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698