| 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 277461ae7baec6a5ecf73178c72ec8cf0dd89945..6fc3b3d39e5e6dbc267e35400554060c626c624a 100644
|
| --- a/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
|
| +++ b/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -181,6 +181,17 @@ TEST_F(GLES2UtilTest, RenderbufferBytesPerPixel) {
|
| EXPECT_EQ(0u, GLES2Util::RenderbufferBytesPerPixel(-1));
|
| }
|
|
|
| +TEST_F(GLES2UtilTest, SwizzleLocation) {
|
| + GLint power = 1;
|
| + for (GLint p = 0; p < 5; ++p, power *= 10) {
|
| + GLint limit = power * 20 + 1;
|
| + for (GLint ii = -limit; ii < limit; ii += power) {
|
| + GLint s = GLES2Util::SwizzleLocation(ii);
|
| + EXPECT_EQ(ii, GLES2Util::UnswizzleLocation(s));
|
| + }
|
| + }
|
| +}
|
| +
|
| } // namespace gles2
|
| } // namespace gpu
|
|
|
|
|