Commit graph

87 commits

Author SHA1 Message Date
Patrick Johnmeyer
11405eee0f Add *.bat as eol=crlf. 2013-03-24 01:31:40 -05:00
Patrick Johnmeyer
ce196f218a Add support and project files for Visual Studio 2012 2013-03-24 01:13:10 -05:00
Patrick Johnmeyer
c13d2471e9 Merge pull request #34 from pjohnmeyer/version1.4CompatibilityFixes
Address multiple version 1.4 incompatibilities
2013-03-23 21:07:52 -07:00
Patrick Johnmeyer
c23edddd15 - Fixed include path in CMakeLists.txt 2013-03-23 22:24:57 -05:00
Patrick Johnmeyer
57e049c523 Add Markdown formatting to README.md 2013-02-20 23:04:28 -06:00
Patrick Johnmeyer
e5d732991c Rename README to README.md 2013-02-20 23:04:14 -06:00
Patrick Johnmeyer
e239750813 Delete COPYING (previously renamed to LICENSE). 2013-02-20 22:59:33 -06:00
Patrick Johnmeyer
647ce0a491 Rename COPYING to LICENSE; delete NEWS since it was empty anyway. 2013-02-20 22:59:01 -06:00
Patrick Johnmeyer
859e6250d2 Move src to UnitTest++ and move src/tests to tests.
CMakeLists was modified to support this, then include paths for the
test executable also had to be modified to include UnitTest++.
2013-02-20 00:22:14 -06:00
Patrick Johnmeyer
deb7e2736d Ensure all headers, including platform, are being installed. 2013-02-20 00:13:07 -06:00
Patrick Johnmeyer
0f8d425de7 Move config.h to src/Config.h.
This is a 1.4 compatibility and consistency change.
2013-02-20 00:01:55 -06:00
Patrick Johnmeyer
c3aa1e45a8 Move unittestpp.h to src/UnitTestPP.h and add src/UnitTest++.h.
This is a 1.4 compatibility and consistency fix.
2013-02-19 23:56:22 -06:00
Patrick Johnmeyer
13a6c9e6ad Add install targets and install path customization.
This commit adds install() directives to the CMake file. By default,
headers will be installed to CMAKE_INSTALL_PREFIX/include/UnitTest++
and libUnitTest++.a will be installed to CMAKE_INSTALL_PREFIX/lib.

If the user defines UTPP_USE_PLUS_SIGN=OFF when generating, the ++
will be replaced with PP in both the library file name and the
include path.
2013-02-19 23:35:10 -06:00
Patrick Johnmeyer
c702d69a85 Revert "Add install targets and install path customization."
This reverts commit 1fa77e11c6.
2013-02-19 23:33:33 -06:00
Patrick Johnmeyer
8a58afab17 Add install targets and install path customization.
This commit adds install() directives to the CMake file. By default,
headers will be installed to CMAKE_INSTALL_PREFIX/include/UnitTest++
and libUnitTest++.a will be installed to CMAKE_INSTALL_PREFIX/lib.

If the user defines UTPP_USE_PLUS_SIGN=OFF when generating, the ++
will be replaced with PP in both the library file name and the
include path.
2013-02-19 23:26:18 -06:00
Patrick Johnmeyer
b840df2d0d Change default MemoryOutStream to be a std::ostringstream.
This changes restores the default behavior to that of UT++ 1.4.

It is accomplished by reintroducing the old UNITTEST_USE_CUSTOM_STREAMS
define, commented out, and surrounding the new define in an ifndef
block. It was done this way to preserve any unconventional users that
were specifying either flag in their build system, instead of in this
file.
2013-02-19 22:23:26 -06:00
Patrick Johnmeyer
0c329ad8c2 Merge pull request #33 from pjohnmeyer/addingWhatToCheckMessages
Add .what() to check messages for unhandled std::exceptions.

Adds a `UT_CATCH(std::exception...)` block to:

    CHECK
    CHECK_EQUAL
    CHECK_CLOSE
    CHECK_ARRAY_CLOSE
    CHECK_ARRAY_EQUAL
    CHECK_ARRAY2D_CLOSE

Closes #11.
2013-02-19 19:58:59 -08:00
Patrick Johnmeyer
299df3efe5 Group all exception tests into suites and normalize indentation. 2013-02-19 21:46:40 -06:00
Patrick Johnmeyer
4a95a3473a Add .what() to error reporting for std::exceptions in CHECK_ARRAY2D_CLOSE. 2013-02-19 21:40:38 -06:00
Patrick Johnmeyer
af9d91d16b Add .what() to error reporting for std::exceptions in CHECK_ARRAY_EQUAL. 2013-02-19 21:20:34 -06:00
Patrick Johnmeyer
17293bf412 Add .what() to error reporting for std::exceptions in CHECK_ARRAY_CLOSE. 2013-02-17 22:46:04 -06:00
Patrick Johnmeyer
858fa04977 Refactor TestExceptions CheckClose tests to use a fixture and add additional tests for std:: exceptions. 2013-02-17 22:23:59 -06:00
Patrick Johnmeyer
3d1e3324d2 Refactor TestExceptions CheckEqual tests to use a fixture and add additional tests for std:: exceptions. 2013-02-17 22:17:35 -06:00
Patrick Johnmeyer
7e97b46aa4 Improve CheckFixture method names.
Rename `CheckFixture::Throw` to `CheckFixture::PerformCheckWithNonStdThrow`.
Rename `CheckFixture::StdThrow` to CheckFixture::PerformCheckWithStdThrow`.
2013-02-17 22:03:36 -06:00
Patrick Johnmeyer
6266300f01 Refactor common logic for CHECK tests into a fixture and add separate tests for std::exception and non. 2013-02-17 00:31:05 -06:00
Patrick Johnmeyer
0950a96eee Add .what() to error message when standard exception is raised in CHECK_CLOSE. 2013-02-16 23:59:18 -06:00
Patrick Johnmeyer
5ddcdd9682 Add .what() to error message when standard exception is raised in CHECK_EQUAL. 2013-02-16 23:56:20 -06:00
Patrick Johnmeyer
fbf390cd8d Add .what() to error message when standard exception is raised in CHECK. 2013-02-16 23:53:30 -06:00
Patrick Johnmeyer
4a0d15302e Merge pull request #31 from rioki/master
Visual Studio 2010 Project Files
2013-02-15 17:14:15 -08:00
Sean Farrell
d62159e6ab Adds .gitignore. 2013-02-15 13:35:23 +01:00
Sean Farrell
14ec171068 Adds Visual Studio 2010 project files. 2013-02-15 13:34:58 +01:00
Sean Farrell
cd36781bed Fixes compile error with MSC.
Unfortunately MSC does not support C99 where snprintf was added to the
standard. As a workaround alias _snprint to snprintf.
2013-02-15 13:34:25 +01:00
Patrick Johnmeyer
e5dc218387 Merge pull request #29 from pjohnmeyer/removeSizeDependenciesFromTestMemoryOutStream
Converted integral stream testing to min/max/mid style. Fixes #14.
2013-02-08 21:48:23 -08:00
Patrick Johnmeyer
4706ca942f Converted integral stream testing to min/max/mid style. Added hard-coded strings for each sizeof() the common integral sizes to eliminate dependency on platform-specific sizes. 2013-02-08 23:33:47 -06:00
Patrick Johnmeyer
db81d25d94 Merge pull request #28 from pjohnmeyer/fixCheckEqualCrashForLargeNumbers
Changed sprintf to snprintf in MemoryOutStream::FormatToStream. Fixes #18.
2013-02-08 18:46:04 -08:00
Patrick Johnmeyer
000349718d Changed sprintf to snprintf in MemoryOutStream::FormatToStream. Removed trailing 'f' from floats and formatted all floats and doubles to '%0.6f'. 2013-02-06 00:13:45 -06:00
Patrick Johnmeyer
9f7f6e366c Merge pull request #27 from pjohnmeyer/declarationDefinitionMismatch
Changed all parameters to TestReporterStdout::ReportSummary to be const. Closes #15.
2013-02-05 21:24:11 -08:00
Patrick Johnmeyer
107378a397 Changed all parameters to TestReporterStdout::ReportSummary to be const. This best preserved the intent of the original definition while supporting a non-conformant compiler that could not handle the mismatch. 2013-02-05 23:22:32 -06:00
Patrick Johnmeyer
5f90bc56d7 Merge pull request #26 from pjohnmeyer/fixUnitTestTimeConstraintExemptForFixtures
Fix unit test time constraint exempt for fixtures; closes #9.
2013-02-05 19:15:13 -08:00
Patrick Johnmeyer
c5cc43c701 Merge pull request #25 from pjohnmeyer/fixCheckEqualExplodesIfNull
CHECK_EQUAL no longer crashes if string pointers are NULL. Closes #8.
2013-02-02 23:47:02 -08:00
Patrick Johnmeyer
4dced283c8 Refactored SlowTestWithTimeExemptionPass into two tests, defined in the SlowTestHelper namespace. These tests are actually run by new test SlowTestsWithTimeExemptionsPass. 2013-02-03 01:38:16 -06:00
Patrick Johnmeyer
904f733b15 Added test verifying that UNITTEST_TIME_CONSTRAINT works in TEST_FIXTURE tests. 2013-02-03 01:14:24 -06:00
Patrick Johnmeyer
69acc43ef4 CHECK_EQUAL no longer crashes if string pointers are NULL. 2013-02-03 00:47:52 -06:00
Pete Johns
aeaae3e6e6 Compare char* with char* to fix OS X build with clang. 2013-01-31 20:49:24 -06:00
Patrick Johnmeyer
7e99532785 Normalized line endings 2013-01-31 20:49:13 -06:00
Patrick Johnmeyer
8379eb5661 Fix inadvertent 'crlt' for .vcxproj 2013-01-26 09:04:33 -06:00
Patrick Johnmeyer
cbbcffa26b Setting up an initial .gitattributes to start dealing with line endings 2013-01-26 01:27:06 -06:00
Patrick Johnmeyer
4ca25c5651 Merged googlecode branch, closes #3 2013-01-26 01:05:18 -06:00
Patrick Johnmeyer
e83811d8d7 Closes #2 2013-01-26 01:01:37 -06:00
Patrick Johnmeyer
443b35690a Fixed test failures in Streaming[Unsigned]LongLongWritesCorrectCharacters 2013-01-10 00:05:00 -06:00