fixed CountedTest compilation problem attempting to access a private variable. Also...
authorchristian.brunschen <christian.brunschen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Sat, 2 Aug 2008 08:36:54 +0000 (08:36 +0000)
committerchristian.brunschen <christian.brunschen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Sat, 2 Aug 2008 08:36:54 +0000 (08:36 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@543 59b500cc-1b3d-0410-9834-0bbf25fbcc57

cpp/core/tests/src/TestRunner.cpp
cpp/core/tests/src/common/CountedTest.cpp

index ba3ba46..4aba6e7 100644 (file)
@@ -27,5 +27,5 @@ int main(int argc, char **argv)
   CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
   runner.addTest(registry.makeTest());
   bool wasSuccessful = runner.run("", false);
-  return wasSuccessful;
+  return wasSuccessful ? 0 : 1;
 }
\ No newline at end of file
index f496c8d..741f2e9 100644 (file)
@@ -39,14 +39,14 @@ namespace common {
   
   void CountedTest::test() {
     Foo foo;
-    CPPUNIT_ASSERT_EQUAL(0U, foo.count_);
+    CPPUNIT_ASSERT_EQUAL(0, foo.count());
     foo.retain();
-    CPPUNIT_ASSERT_EQUAL(1U, foo.count_);
+    CPPUNIT_ASSERT_EQUAL(1, foo.count());
     {
       Ref<Foo> fooRef(foo);
-      CPPUNIT_ASSERT_EQUAL(2U, foo.count_);
+      CPPUNIT_ASSERT_EQUAL(2, foo.count());
     }
-    CPPUNIT_ASSERT_EQUAL(1U, foo.count_);
+    CPPUNIT_ASSERT_EQUAL(1, foo.count());
   }
 
 }