summaryrefslogtreecommitdiff
path: root/tests/main.cpp
AgeCommit message (Collapse)Author
2016-11-19tests: Fix unused variable warning in some compilersArseny Kapoulkine
The variable is being assigned to but never read when exceptions are disabled.
2016-01-24Fix whitespace issuesStephan Beyer
Git warns when it finds "whitespace errors". This commit gets rid of these whitespace errors for code and adoc files.
2015-04-12Permit custom allocation function to throwArseny Kapoulkine
Ensure that all the necessary cleanup is performed in case the allocation fails with an exception - files are closed, buffers are reclaimed, etc. Any test that triggers a simulated out-of-memory condition is ran once again with a throwing allocation function. Unobserved std::bad_alloc count as test failures and require CHECK_ALLOC_FAIL macro. Fixes #17.
2015-04-11tests: Improve out-of-memory testsArseny Kapoulkine
Previously there was no guarantee that the tests that check for out of memory handling behavior are actually correct - e.g. that they correctly simulate out of memory conditions. Now every simulated out of memory condition has to be "guarded" using CHECK_ALLOC_FAIL. It makes sure that every piece of code that is supposed to cause out-of-memory does so, and that no other code runs out of memory unnoticed.
2014-10-26tests: Add a way for tests to verify allocation failureArseny Kapoulkine
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1081 99668b35-9821-0410-8761-19e4c4f06640
2014-10-21tests: Assert on out-of-memory in testsArseny Kapoulkine
This should never happen but can improve debugging experience for work-in-progress changes since that avoids memcpy() into negative memory space (debugger can't backtrace from failed memcpy since it does not set up the stack frame). git-svn-id: https://pugixml.googlecode.com/svn/trunk@1070 99668b35-9821-0410-8761-19e4c4f06640
2014-02-26tests: Fix WinCE compilationArseny Kapoulkine
git-svn-id: https://pugixml.googlecode.com/svn/trunk@991 99668b35-9821-0410-8761-19e4c4f06640
2014-02-19tests: Write temporary files to executable folder.Arseny Kapoulkine
Temp folder is the root folder on Windows; writing to the folder may require administrator rights. We can't use current folder for temporaries because tests from different configurations can be running in parallel, but executable folder is always safe since we only run each executable once. git-svn-id: https://pugixml.googlecode.com/svn/trunk@984 99668b35-9821-0410-8761-19e4c4f06640
2014-02-10Replace memory-management functions before every test.Arseny Kapoulkine
In case a test sets memory-management functions to perform custom testing and fails midway, all subsequent tests that rely on custom memory handling (i.e. threshold) can fail unexpectedly. Setting up the functions before every test fixes this, making all tests self-contained. git-svn-id: https://pugixml.googlecode.com/svn/trunk@976 99668b35-9821-0410-8761-19e4c4f06640
2012-03-06tests: Miscellaneous fixesarseny.kapoulkine@gmail.com
git-svn-id: http://pugixml.googlecode.com/svn/trunk@850 99668b35-9821-0410-8761-19e4c4f06640
2012-03-06tests: Android compilation fixesarseny.kapoulkine@gmail.com
git-svn-id: http://pugixml.googlecode.com/svn/trunk@846 99668b35-9821-0410-8761-19e4c4f06640
2012-02-19tests: Minor fixes for WinCE compilationarseny.kapoulkine@gmail.com
git-svn-id: http://pugixml.googlecode.com/svn/trunk@834 99668b35-9821-0410-8761-19e4c4f06640
2011-02-16tests: Fixed C++/CLI compilation warningarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@807 99668b35-9821-0410-8761-19e4c4f06640
2010-12-19Enabled many additional GCC warnings (most notably -Wshadow and ↵arseny.kapoulkine
-Wold-style-cast), fixed the code accordingly git-svn-id: http://pugixml.googlecode.com/svn/trunk@800 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29tests: Various compilation fixes for BCC and MSVC6arseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@702 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29tests: Remove new/delete overrides (all pugi code now uses custom allocators)arseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@668 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29tests: Deallocation of null pointer is illegal for custom allocatorsarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@656 99668b35-9821-0410-8761-19e4c4f06640
2010-08-04tests: Fixed tests for wchar_t mode, added dummy std::cout/wcout usage for ↵arseny.kapoulkine
MSVC in order to create locales beforehand (avoids memory leaks during tests), minor additional test fixes git-svn-id: http://pugixml.googlecode.com/svn/trunk@629 99668b35-9821-0410-8761-19e4c4f06640
2010-08-03tests: New and delete operators now use test allocator and thus are subject ↵arseny.kapoulkine
to leak detection and memory threshold failure git-svn-id: http://pugixml.googlecode.com/svn/trunk@624 99668b35-9821-0410-8761-19e4c4f06640
2010-07-19Set svn:eol-style to native for all text filesarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@607 99668b35-9821-0410-8761-19e4c4f06640
2010-07-15tests: Added Xbox360 and PS3 toolset supportarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@602 99668b35-9821-0410-8761-19e4c4f06640
2010-06-13Internal XML parsing error handling is done via setjmp/longjmp, all ↵arseny.kapoulkine
allocation errors are now handled correctly (parser returns status_out_of_memory, modification functions return errors); added tests for some out of memory situations git-svn-id: http://pugixml.googlecode.com/svn/trunk@520 99668b35-9821-0410-8761-19e4c4f06640
2010-05-09Improved memory leak detectionarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@398 99668b35-9821-0410-8761-19e4c4f06640
2010-05-06Integrated changes from unicode branch to trunkarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@383 99668b35-9821-0410-8761-19e4c4f06640
2010-04-20unicode: Fixed tests for Linuxarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@280 99668b35-9821-0410-8761-19e4c4f06640
2009-10-29tests: CodeWarrior and BCC supportedarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@195 99668b35-9821-0410-8761-19e4c4f06640
2009-10-29tests: Tests can work without exceptions nowarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@194 99668b35-9821-0410-8761-19e4c4f06640
2009-10-29tests: Supported all pugixml compilation modesarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@191 99668b35-9821-0410-8761-19e4c4f06640
2009-10-28tests: More fixes and toolsets supportarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@190 99668b35-9821-0410-8761-19e4c4f06640
2009-10-20tests: Added memory leak detectionarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@165 99668b35-9821-0410-8761-19e4c4f06640
2009-10-10tests: Added simple test framework, added a couple of testsarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@140 99668b35-9821-0410-8761-19e4c4f06640
2009-10-10Initial test building support along with a stub test filearseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@138 99668b35-9821-0410-8761-19e4c4f06640