Skip to content

Commit

Permalink
Use PASS() everywhere in ppapi/tests.
Browse files Browse the repository at this point in the history
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/4182010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70779 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
neb@chromium.org committed Jan 7, 2011
1 parent c9253c2 commit ce8b30e
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 67 deletions.
6 changes: 3 additions & 3 deletions ppapi/tests/test_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ std::string TestBuffer::TestInvalidSize() {
if (!zero_size.is_null())
return "Zero size accepted";

return "";
PASS();
}

std::string TestBuffer::TestInitToZero() {
Expand All @@ -48,7 +48,7 @@ std::string TestBuffer::TestInitToZero() {
return "Buffer isn't entirely zero";
}

return "";
PASS();
}

std::string TestBuffer::TestIsBuffer() {
Expand All @@ -72,6 +72,6 @@ std::string TestBuffer::TestIsBuffer() {
if (!buffer_interface_->IsBuffer(buffer.pp_resource()))
return "Buffer should be identified as a buffer";

return "";
PASS();
}

4 changes: 2 additions & 2 deletions ppapi/tests/test_char_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ std::string TestCharSet::TestUTF16ToCharSet() {
ASSERT_TRUE(!utf8result);
ASSERT_TRUE(utf8result_len == 0);

return std::string();
PASS();
}

std::string TestCharSet::TestCharSetToUTF16() {
Expand Down Expand Up @@ -148,7 +148,7 @@ std::string TestCharSet::TestCharSetToUTF16() {
ASSERT_TRUE(!utf16result);
ASSERT_TRUE(utf16result_len == 0);

return std::string();
PASS();
}

std::vector<uint16_t> TestCharSet::UTF8ToUTF16(const std::string& utf8) {
Expand Down
6 changes: 3 additions & 3 deletions ppapi/tests/test_file_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ std::string TestFileIO::TestOpen() {
if (rv != PP_ERROR_FILENOTFOUND)
return ReportError("FileIO::Open", rv);

return "";
PASS();
}

std::string TestFileIO::TestReadWriteSetLength() {
Expand Down Expand Up @@ -227,7 +227,7 @@ std::string TestFileIO::TestReadWriteSetLength() {
return ReportMismatch("FileIO::Read", read_buffer,
std::string("testtest\0\0\0\0", 12));

return "";
PASS();
}

std::string TestFileIO::TestTouchQuery() {
Expand Down Expand Up @@ -281,5 +281,5 @@ std::string TestFileIO::TestTouchQuery() {
(info.last_modified_time != last_modified_time))
return "FileSystem::Query() has returned bad data.";

return "";
PASS();
}
16 changes: 8 additions & 8 deletions ppapi/tests/test_file_ref.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ std::string TestFileRef::TestGetFileSystemType() {
if (file_ref_ext.GetFileSystemType() != PP_FILESYSTEMTYPE_EXTERNAL)
return "file_ref_ext expected to be external.";

return "";
PASS();
}

std::string TestFileRef::TestGetName() {
Expand Down Expand Up @@ -142,7 +142,7 @@ std::string TestFileRef::TestGetName() {
if (name == "")
return ReportMismatch("FileRef::GetName", name, "<a temp file>");

return "";
PASS();
}

std::string TestFileRef::TestGetPath() {
Expand Down Expand Up @@ -185,7 +185,7 @@ std::string TestFileRef::TestGetPath() {
if (!file_ref_ext.GetPath().is_undefined())
return "The path of an external FileRef should be void.";

return "";
PASS();
}

std::string TestFileRef::TestGetParent() {
Expand Down Expand Up @@ -240,7 +240,7 @@ std::string TestFileRef::TestGetParent() {
if (!file_ref_ext.GetParent().is_null())
return "The parent of an external FileRef should be null.";

return "";
PASS();
}

std::string TestFileRef::TestMakeDirectory() {
Expand Down Expand Up @@ -324,7 +324,7 @@ std::string TestFileRef::TestMakeDirectory() {
"should have failed.";
}

return "";
PASS();
}

std::string TestFileRef::TestQueryAndTouchFile() {
Expand Down Expand Up @@ -408,7 +408,7 @@ std::string TestFileRef::TestQueryAndTouchFile() {
return ReportError("FileSystem::Query", rv);
}

return "";
PASS();
}

std::string TestFileRef::TestDeleteFileAndDirectory() {
Expand Down Expand Up @@ -492,7 +492,7 @@ std::string TestFileRef::TestDeleteFileAndDirectory() {
return ReportError("FileSystem::Delete", rv);
}

return "";
PASS();
}

std::string TestFileRef::TestRenameFileAndDirectory() {
Expand Down Expand Up @@ -574,5 +574,5 @@ std::string TestFileRef::TestRenameFileAndDirectory() {
return ReportError("FileSystem::Rename", rv);
}

return "";
PASS();
}
18 changes: 9 additions & 9 deletions ppapi/tests/test_graphics_2d.cc
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ std::string TestGraphics2D::TestInvalidResource() {
&zero_zero))
return "ReadImageData succeeded with a NULL resource";

return "";
PASS();
}

std::string TestGraphics2D::TestInvalidSize() {
Expand All @@ -258,14 +258,14 @@ std::string TestGraphics2D::TestInvalidSize() {
ASSERT_FALSE(!!graphics_2d_interface_->Create(
pp::Module::Get()->pp_module(), &size, PP_FALSE));

return "";
PASS();
}

std::string TestGraphics2D::TestHumongous() {
pp::Graphics2D a(instance_, pp::Size(100000, 100000), false);
if (!a.is_null())
return "Humongous device created";
return "";
PASS();
}

std::string TestGraphics2D::TestInitToZero() {
Expand All @@ -288,7 +288,7 @@ std::string TestGraphics2D::TestInitToZero() {
if (!IsSquareInImage(image, 0, pp::Rect(0, 0, w, h), 0))
return "Got a nonzero pixel";

return "";
PASS();
}

std::string TestGraphics2D::TestDescribe() {
Expand All @@ -307,7 +307,7 @@ std::string TestGraphics2D::TestDescribe() {
if (size.width != w || size.height != h || is_always_opaque != PP_FALSE)
return "Mismatch of data.";

return "";
PASS();
}

std::string TestGraphics2D::TestPaint() {
Expand Down Expand Up @@ -386,7 +386,7 @@ std::string TestGraphics2D::TestPaint() {
subset_color))
return "Subset paint failed.";

return "";
PASS();
}

std::string TestGraphics2D::TestScroll() {
Expand Down Expand Up @@ -448,7 +448,7 @@ std::string TestGraphics2D::TestScroll() {
if (!CompareImages(test_image, readback))
return "TC2, Read back image is not the same as test image.";

return "";
PASS();
}

std::string TestGraphics2D::TestReplace() {
Expand Down Expand Up @@ -502,7 +502,7 @@ std::string TestGraphics2D::TestReplace() {
if (!IsDCUniformColor(dc, swapped_color))
return "Flushed color incorrect (or failure in readback).";

return "";
PASS();
}

std::string TestGraphics2D::TestFlush() {
Expand Down Expand Up @@ -544,5 +544,5 @@ std::string TestGraphics2D::TestFlush() {
return "Second flush succeeded before callback ran.";
}

return "";
PASS();
}
10 changes: 5 additions & 5 deletions ppapi/tests/test_image_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ std::string TestImageData::TestInvalidFormat() {
if (!b.is_null())
return "Negative image data format accepted";

return "";
PASS();
}

std::string TestImageData::TestInvalidSize() {
Expand Down Expand Up @@ -76,15 +76,15 @@ std::string TestImageData::TestInvalidSize() {
if (rsrc)
return "Negative width accepted";

return "";
PASS();
}

std::string TestImageData::TestHugeSize() {
pp::ImageData huge_size(instance_, PP_IMAGEDATAFORMAT_BGRA_PREMUL,
pp::Size(100000000, 100000000), true);
if (!huge_size.is_null())
return "31-bit overflow size accepted";
return "";
PASS();
}

std::string TestImageData::TestInitToZero() {
Expand Down Expand Up @@ -113,7 +113,7 @@ std::string TestImageData::TestInitToZero() {
}
}

return "";
PASS();
}

std::string TestImageData::TestIsImageData() {
Expand All @@ -138,5 +138,5 @@ std::string TestImageData::TestIsImageData() {
if (!image_data_interface_->IsImageData(img.pp_resource()))
return "Image data should be identified as an image";

return "";
PASS();
}
2 changes: 1 addition & 1 deletion ppapi/tests/test_instance_deprecated.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,5 @@ std::string TestInstance::TestExecuteScript() {
ASSERT_TRUE(ret.is_undefined());
ASSERT_TRUE(exception.is_string()); // Don't know exactly what it will say.

return std::string();
PASS();
}
Loading

0 comments on commit ce8b30e

Please sign in to comment.