diff options
author | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-27 22:46:31 +0000 |
---|---|---|
committer | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-27 22:46:31 +0000 |
commit | dca5cbb44a2665ce7248d99fae0007ed344734cf (patch) | |
tree | e77968d2f3f085d9cab529b1b68f54d4508850a0 /webkit/glue/cpp_variant_unittest.cc | |
parent | 7b44dee2620540809ccda43ab3041a5908d775e1 (diff) | |
download | chromium_src-dca5cbb44a2665ce7248d99fae0007ed344734cf.zip chromium_src-dca5cbb44a2665ce7248d99fae0007ed344734cf.tar.gz chromium_src-dca5cbb44a2665ce7248d99fae0007ed344734cf.tar.bz2 |
Port a few test_shell_tests. Now it runs 45 of them.
I removed some files from test_files because scons complains (warns)
when a file is both in test_files and input_files. So the files removed from
test_files also exist in input_files and at some pointed will be ported anyway.
I also made some linking stubs.
BUG=3674
Review URL: http://codereview.chromium.org/7974
Patch from Paweł Hajdan jr <phajdan.jr@gmail.com>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4031 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/cpp_variant_unittest.cc')
-rw-r--r-- | webkit/glue/cpp_variant_unittest.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/webkit/glue/cpp_variant_unittest.cc b/webkit/glue/cpp_variant_unittest.cc index bb3ecc8..8933b85 100644 --- a/webkit/glue/cpp_variant_unittest.cc +++ b/webkit/glue/cpp_variant_unittest.cc @@ -53,7 +53,7 @@ int g_deallocate_call_count = 0; void CheckObject(const NPVariant& actual) { EXPECT_EQ(NPVariantType_Object, actual.type); EXPECT_TRUE(actual.value.objectValue); - EXPECT_EQ(1, actual.value.objectValue->referenceCount); + EXPECT_EQ(1U, actual.value.objectValue->referenceCount); EXPECT_EQ(1, g_allocate_call_count); EXPECT_EQ(0, g_deallocate_call_count); } @@ -117,10 +117,10 @@ TEST(CppVariantTest, CopyConstructorIncrementsRefCount) { NPObject *object = MakeVoidObject(); source.Set(object); // 2 references so far. - EXPECT_EQ(2, source.value.objectValue->referenceCount); + EXPECT_EQ(2U, source.value.objectValue->referenceCount); CppVariant dest = source; - EXPECT_EQ(3, dest.value.objectValue->referenceCount); + EXPECT_EQ(3U, dest.value.objectValue->referenceCount); EXPECT_EQ(1, g_allocate_call_count); NPN_ReleaseObject(object); source.SetNull(); @@ -147,11 +147,11 @@ TEST(CppVariantTest, AssignmentIncrementsRefCount) { NPObject *object = MakeVoidObject(); source.Set(object); // 2 references so far. - EXPECT_EQ(2, source.value.objectValue->referenceCount); + EXPECT_EQ(2U, source.value.objectValue->referenceCount); CppVariant dest; dest = source; - EXPECT_EQ(3, dest.value.objectValue->referenceCount); + EXPECT_EQ(3U, dest.value.objectValue->referenceCount); EXPECT_EQ(1, g_allocate_call_count); NPN_ReleaseObject(object); @@ -300,7 +300,6 @@ TEST(CppVariantTest, SetsSimpleTypesAndValues) { CheckString("std test string", cpp); // NPString - const char *ascii_str = "test NPString"; NPString np_ascii_str = { "test NPString", static_cast<uint32_t>(strlen("test NPString")) }; cpp.Set(np_ascii_str); @@ -336,9 +335,9 @@ TEST(CppVariantTest, FreeDataReleasesObject) { CppVariant cpp; NPObject* object = MakeVoidObject(); cpp.Set(object); - EXPECT_EQ(2, object->referenceCount); + EXPECT_EQ(2U, object->referenceCount); cpp.FreeData(); - EXPECT_EQ(1, object->referenceCount); + EXPECT_EQ(1U, object->referenceCount); EXPECT_EQ(0, g_deallocate_call_count); cpp.Set(object); |