summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* get rid of old casting macrosMarkus Mohrhard2021-10-012-2/+2
|
* Replace NULL with nullptrFlorian Becker2021-10-015-14/+14
|
* Fixed CPPUNIT_ASSERT_EQUAL() being called on doublesАлексей Тулинов2020-08-311-1/+1
| | | | | | | Change-Id: Ie72531ebdc858a0122886a7a3cfe49185dc0ff76 Reviewed-on: https://gerrit.libreoffice.org/c/cppunit/+/101688 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* drop project files for old versions of MSVCDavid Tardon2019-12-2219-2089/+7
| | | | | | | Change-Id: I36ceddb5a8a1f8e96b36a2e851338366cda1808d Reviewed-on: https://gerrit.libreoffice.org/85662 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* remove traces of .ds[pw] files from docsDavid Tardon2019-12-221-2/+2
| | | | | | | Change-Id: I6ebc31181ccfe379be96e979cda3717a991cf513 Reviewed-on: https://gerrit.libreoffice.org/85663 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* tdf#126163: fix regression from 339b60ab77ce3f2037c9410eb14251c8132df08acppunit-1.15.0Markus Mohrhard2019-11-291-2/+1
|
* Fix build with gcc9.1Martin Liška2019-04-301-0/+6
| | | | | | | Change-Id: I8a0d7a0b51b5c537dbcfa8fdd34e816605b1f32e Reviewed-on: https://gerrit.libreoffice.org/71573 Reviewed-by: Tomáš Chvátal <tchvatal@suse.cz> Tested-by: Tomáš Chvátal <tchvatal@suse.cz>
* Documentation updatesAndrés Maldonado2019-03-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | doc/other_documentation.dox: * add instructions to build documentation * replace a dead link with it's archived version on WaybackMachine doc/Money.dox: * replace `configure.in` with `configure.ac` * update MoneyApp.cpp with the version at `examples/money/MoneyApp.cpp` * remove all occurrences of `#include "stdafx.h"` (stdafx.h does not exist in this example) * replace all occurrences of CppUnit:: with CPPUNIT_NS:: * Undo a fix in commit 652d51e653568fbf652a248c7b9e01e72e6ec50f * This commit fixed the following error: ``` Money( double amount, std::string currency ) : m_amount( amount ) , m_currency( m_currency ) ``` But this error was introduced on purpose, so that the user can see that an assertion failed * fix some spelling errors * other minor edits examples/money/MoneyTest.h: * Updated to match doc/Money.dox Change-Id: I4e90b1a3afadab94f7112c36fcb0d1c467169269 Reviewed-on: https://gerrit.libreoffice.org/67787 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
* use [] in AC macrosMarkus Mohrhard2019-02-161-1/+1
|
* Modernize AM_INIT_AUTOMAKE syntaxAndrés Maldonado2019-02-161-2/+3
| | | | | | | | | For more info, see: https://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation Change-Id: If27065b6d9c9245717ca24e0c0e1fa4c29bc3e5c Reviewed-on: https://gerrit.libreoffice.org/67808 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* custom tostring formatter to CPPUNIT_ASSERT_MESSAGENoel Grandin2019-02-142-0/+32
| | | | | | | | | | Provide an extension trait message_to_string that allows client code to call ASSERT_MESSAGE with their own string types. Also provide a default extension trait that accepts std::ostream messages. Change-Id: I516f97063c34d86bc91c40e0ec147d5393e7b6ea
* extensions: add CPPUNIT_TEST_FIXTURE()Miklos Vajna2018-11-021-0/+15
| | | | | | | | | | This is similar to googletest's TEST_F() macro, allows to avoid spelling out the test name in a suite only once, not 3 times. Change-Id: I90804d271d046d8158678617d8db75ed6ca7c420 Reviewed-on: https://gerrit.libreoffice.org/61732 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* fix make distcheck, part2Markus Mohrhard2018-05-231-1/+1
|
* Fix money example on propely linking with library with PKG_CHECK.Dimitrij Mijoski2017-09-152-5/+8
| | | | | | | Change-Id: If42a50386402b7a601268cf8db80236c147009c1 Reviewed-on: https://gerrit.libreoffice.org/42206 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* remove more msvc specific code and bc5 stuffMarkus Mohrhard2017-04-1341-5433/+0
|
* remove the qt test runner that depends on ancient qtMarkus Mohrhard2017-04-1311-572/+0
|
* implement parameterized testsMarkus Mohrhard2016-12-162-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows to execute the same test with different parameters and treats each execution as an own test. The change consists of two parts, the TestCaller can now handle any callable which also makes it easy to generate programatically more complex test cases as well as the new CPPUNIT_TEST_PARAMETERIZED macro. That macro takes the test name as well as an iteratable, e.g. std::initializer_list. An example for this usage is: class SimpleTest : public CppUnit::TestFixture { public: CPPUNIT_TEST_SUITE(SimpleTest); CPPUNIT_TEST_PARAMETERIZED(test, {1, 2, 3, 4}); CPPUNIT_TEST_SUITE_END(); void test(int i) { CPPUNIT_ASSERT(i < 5); } }; which will execute test 4 times with the values 1 to 4.
* AM_CPPFLAGS is preferred by "newer" versions of automakeDavid Tardon2016-12-164-4/+4
|
* drop project files for Visual Studio < 2010David Tardon2016-12-162-2/+2
|
* tdf#104498 CPPUNIT_USE_TYPEINFO_NAME is a flagDavid Tardon2016-12-162-2/+2
| | | | ... so check just for existence.
* we no longer need a wrapper for the smart pointer caseMarkus Mohrhard2016-12-154-17/+18
|
* add support for enum class to the asserterMarkus Mohrhard2016-12-131-0/+8
| | | | | | The asserter now has special handling to convert the enum class to a std::string. This does not work without some template magic as enum class has no implicit conversion to int.
* remove support for old broken C++ compilersMarkus Mohrhard2016-12-113-11/+11
|
* add a flag for adding optional featuresMarkus Mohrhard2015-11-074-18/+20
| | | | | | These features will switch the used C++ version from C++03 to C++11. We are also going to use std::unique_ptr instead of std::auto_ptr for the c++11 mode.
* add new assertion macros for <, <=, > and >=Markus Mohrhard2014-07-132-0/+53
| | | | | | | | | Now we support the following new macros: - CPPUNIT_ASSERT_LESS - CPPUNIT_ASSERT_GREATER - CPPUNIT_ASSERT_LESSEQUAL - CPPUNIT_ASSERT_GREATEREQUAL
* Fix "No newline at end of file"Julien Nabet2012-08-152-2/+2
|
* Merge branch 'master' into feature/buildsystem_rewriteTomas Chvatal2012-08-061-8/+4
|\ | | | | | | | | | | | | | | | | Conflicts: .gitignore autogen.sh configure.in doc/Makefile.am examples/cppunittest/TestAssertTest.cpp
| * a bit warning cleaning in the testsMarkus Mohrhard2012-06-161-0/+4
| | | | | | | | -Werror -Wall -Wextra now works in make and in make check
* | WaE: set but unused variables in testsMarkus Mohrhard2012-04-251-0/+8
| |
* | Automake cleanup, install and generate changelogTomas Chvatal2012-04-254-15/+6
| |
* | Add the quirks to produce same config.h as previouslyTomas Chvatal2012-04-251-0/+1
|/
* examples/examples2008.sln: Fixed compilation issue in debugBaptiste Lepilleur2009-11-241-415/+415
| | | | | configuration with VS2008 (due to incorrect configuration being picked up).
* Applied patch #2807259: lib -ldl... should be in LDADD instead of LDFLAGSBaptiste Lepilleur2009-11-234-15/+8
|
* Added updated project and instructions for building under Visual Studio.Net 2008Andy Dent2008-12-1611-0/+7607
|
* Replace deprecated CPPUNIT_TEST_EXCEPTION with code using CPPUNIT_ASSERT_THROW.Steve M. Robbins2008-02-212-2/+2
|
* Changes to suppress warnings of gcc -Wall -W -ansi, mainly from patch [1898225].Steve M. Robbins2008-02-217-18/+18
|
* - removed wrong comment.Baptiste Lepilleur2007-02-251-1/+1
|
* Src/cppunit/TestAssert.Baptiste Lepilleur2007-02-242-3/+42
| | | | | | | | | | | | | | | | | | | src/cppunit/TestAssert.cpp (assertDoubleEquals): Moved finite & NaN tests to include/cppunit/portability/FloatingPoint.h. Changed implementation assertDoubleEquals to explicitly test for NaN in case of non-finite values to force equality failure in the presence of NaN. Previous implementation failed on Microsoft Visual Studio 6 (on this platform: NaN == NaN). * examples/cppunittest/TestAssertTest.cpp: Add more unit tests to test the portable floating-point primitive. Added missing include <limits>. * include/cppunit/portability/Makefile.am: * include/cppunit/portability/FloatingPoint.h: Added file. Extracted isfinite() from TestAssert.cpp. * include/cppunit/config-evc4: * include/cppunit/config-msvc6: Added support for _finite().
* Add tests of the precision generated bySteve M. Robbins2007-01-315-1/+86
| | | | assertion_traits<double>::toString().
* Remove declaration of unimplemented functions testAssertDoubleNotEquals1 and ↵Steve M. Robbins2007-01-272-2/+6
| | | | | | | | | | testAssertDoubleNotEquals2. * examples/cppunittest/TestAssertTest.cpp: * examples/cppunittest/TestAssertTest.h: Remove declaration of unimplemented functions testAssertDoubleNotEquals1 and testAssertDoubleNotEquals2. Factor new method testAssertDoubleNonFinite out of existing testAssertDoubleEquals.
* Add unit tests for CPPUNIT_ASSERT_DOUBLES_EQUAL() that test withSteve M. Robbins2007-01-271-0/+11
| | | | non-finite values.
* Arrange class initializers in correct order.Steve M. Robbins2007-01-124-10/+10
|
* Put a C++ statement in the first argument of CPPUNIT_ASSERT_THROW()Steve M. Robbins2007-01-121-4/+8
| | | | and CPPUNIT_ASSERT_NO_THROW().
* Fix examples/hierarchy to actually return the result of the tests.Steve M. Robbins2007-01-122-4/+4
| | | | It is expected to fail, so mark it using XFAIL_TESTS in Makefile.am.
* Src/msvc6/TesRunner/TestRunner.Baptiste Lepilleur2006-07-281-9/+9
| | | | | | src/msvc6/TesRunner/TestRunner.rc: * src/msvc6/testpluginrunner/TestPlugInRunner.rc: Fixed bug #1528212 (some resources wrongly tagged as French).
* removed divideByZero test as it cause crashes on some platforms.Baptiste Lepilleur2006-03-042-8/+0
|
* Examples/qt: integrated Ernst patch from qt examples.Baptiste Lepilleur2006-02-0110-36/+438
|
* Integrated Ernst patch for QtTestRunner and Qt 3.Baptiste Lepilleur2005-12-126-23/+76
| | | | | | integrated Ernst patch for QtTestRunner and Qt 3.x. * upgrade QtTestRunner to Qt 3.x * enhanced qmake project files to handle multiple build configuration
* Include/cppunit/config/SourcePrefix.Baptiste Lepilleur2005-11-067-20/+3
| | | | | | | | | | | | | | | | | | include/cppunit/config/SourcePrefix.h: disable warning #4996 (sprintf is deprecated) for visual studio 2005. * include/cppunit/TestAssert.h: use sprintf_s instead of sprintf for visual studio 2005. * examples/ClockerPlugIn/ClockerPlugIn.cpp * examples/DumperPlugIn/DumperPlugIn.cpp: use SourcePrefix.h. Fixed wrong macro usage to implement DllMain. * examples/msvc6/HostApp/ExamplesTestCase.h * examples/msvc6/HostApp/ExamplesTestCase.cpp * examples/simple/ExamplesTestCase.h * examples/simple/ExamplesTestCase.cpp: removed divideByZero test case as it cause some crash on some platforms.
* Removed most warning when compiling with vc++ 6sp6.Baptiste Lepilleur2005-10-132-1/+14
| | | | | removed most warning when compiling with vc++ 6sp6. * added assert equal usage