mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
fixed CountedTest compilation problem attempting to access a private variable. Also fixed TestRunner exit status.
git-svn-id: https://zxing.googlecode.com/svn/trunk@543 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
81c1368068
commit
0fe5931684
|
@ -27,5 +27,5 @@ int main(int argc, char **argv)
|
||||||
CppUnit::TestFactoryRegistry ®istry = CppUnit::TestFactoryRegistry::getRegistry();
|
CppUnit::TestFactoryRegistry ®istry = CppUnit::TestFactoryRegistry::getRegistry();
|
||||||
runner.addTest(registry.makeTest());
|
runner.addTest(registry.makeTest());
|
||||||
bool wasSuccessful = runner.run("", false);
|
bool wasSuccessful = runner.run("", false);
|
||||||
return wasSuccessful;
|
return wasSuccessful ? 0 : 1;
|
||||||
}
|
}
|
|
@ -39,14 +39,14 @@ namespace common {
|
||||||
|
|
||||||
void CountedTest::test() {
|
void CountedTest::test() {
|
||||||
Foo foo;
|
Foo foo;
|
||||||
CPPUNIT_ASSERT_EQUAL(0U, foo.count_);
|
CPPUNIT_ASSERT_EQUAL(0, foo.count());
|
||||||
foo.retain();
|
foo.retain();
|
||||||
CPPUNIT_ASSERT_EQUAL(1U, foo.count_);
|
CPPUNIT_ASSERT_EQUAL(1, foo.count());
|
||||||
{
|
{
|
||||||
Ref<Foo> fooRef(foo);
|
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue