Commit 048c4fe7 by Jamie Madill

Fix buffer tests.

The names of the tests were not properly capitalized, and the huge buffer test could fail unexpectedly when it was run after several prior tests which allocated large amounts of memory. Change-Id: Ied5d1b6f56354e748f0df9d52658d14de9a559ac Reviewed-on: https://chromium-review.googlesource.com/209611Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent e04a5b7b
......@@ -74,7 +74,7 @@ protected:
GLint mAttribLocation;
};
TEST_F(BufferDataTest, null_data)
TEST_F(BufferDataTest, NULLData)
{
glBindBuffer(GL_ARRAY_BUFFER, mBuffer);
EXPECT_GL_NO_ERROR();
......@@ -97,7 +97,7 @@ TEST_F(BufferDataTest, null_data)
}
}
TEST_F(BufferDataTest, zero_nonnull_data)
TEST_F(BufferDataTest, ZeroNonNULLData)
{
glBindBuffer(GL_ARRAY_BUFFER, mBuffer);
EXPECT_GL_NO_ERROR();
......@@ -112,13 +112,13 @@ TEST_F(BufferDataTest, zero_nonnull_data)
delete [] zeroData;
}
TEST_F(BufferDataTest, huge_setdata_should_not_crash)
TEST_F(BufferDataTest, HugeSetDataShouldNotCrash)
{
glBindBuffer(GL_ARRAY_BUFFER, mBuffer);
EXPECT_GL_NO_ERROR();
// use as large a size as possible without causing an exception
GLsizei hugeSize = (1 << 30);
GLsizei hugeSize = (1 << 29);
// on x64, use as large a GLsizei value as possible
if (sizeof(size_t) > 4)
......@@ -127,7 +127,7 @@ TEST_F(BufferDataTest, huge_setdata_should_not_crash)
}
char *data = new (std::nothrow) char[hugeSize];
EXPECT_NE((char * const)NULL, data);
ASSERT_NE((char * const)NULL, data);
if (data == NULL)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment