diff options
| author | Shlomi Fish <shlomif@shlomifish.org> | 2017-02-06 16:50:07 +0000 |
|---|---|---|
| committer | Shlomi Fish <shlomif@shlomifish.org> | 2017-02-06 16:50:07 +0000 |
| commit | 1232596134bcba8d19f2809ffdc84e3b5c33d3b3 (patch) | |
| tree | 2fcb91d6fe9ef47a85ba3f73be10dc5dc7ee10a4 /testfiles/src | |
| parent | Merged. (diff) | |
| parent | Remove some unneeded < C++11 fallback code (diff) | |
| download | inkscape-1232596134bcba8d19f2809ffdc84e3b5c33d3b3.tar.gz inkscape-1232596134bcba8d19f2809ffdc84e3b5c33d3b3.zip | |
Merged.
(bzr r15369.1.18)
Diffstat (limited to 'testfiles/src')
| -rw-r--r-- | testfiles/src/attributes-test.cpp | 1 | ||||
| -rw-r--r-- | testfiles/src/cxxtests-to-migrate/round-test.h | 91 |
2 files changed, 1 insertions, 91 deletions
diff --git a/testfiles/src/attributes-test.cpp b/testfiles/src/attributes-test.cpp index a1b85ff3b..c5f970285 100644 --- a/testfiles/src/attributes-test.cpp +++ b/testfiles/src/attributes-test.cpp @@ -393,6 +393,7 @@ std::vector<AttributeInfo> getKnownAttrs() AttributeInfo("inkscape:current-layer", true), AttributeInfo("inkscape:cx", true), AttributeInfo("inkscape:cy", true), + AttributeInfo("inkscape:document-rotation", true), AttributeInfo("inkscape:document-units", true), AttributeInfo("inkscape:dstBox", true), AttributeInfo("inkscape:dstColumn", true), diff --git a/testfiles/src/cxxtests-to-migrate/round-test.h b/testfiles/src/cxxtests-to-migrate/round-test.h deleted file mode 100644 index 8e9ca69e0..000000000 --- a/testfiles/src/cxxtests-to-migrate/round-test.h +++ /dev/null @@ -1,91 +0,0 @@ - -#ifndef SEEN_ROUND_TEST_H -#define SEEN_ROUND_TEST_H - -#include <cxxtest/TestSuite.h> - -#include <vector> -#include <round.h> - -class RoundTest : public CxxTest::TestSuite -{ -public: - struct Case { - double arg0; - double ret; - }; - - std::vector<Case> nonneg_round_cases; - std::vector<Case> nonpos_round_cases; - - RoundTest() : - TestSuite() - { - Case cases[] = { - { 5.0, 5.0 }, - { 0.0, 0.0 }, - { 5.4, 5.0 }, - { 5.6, 6.0 }, - { 1e-7, 0.0 }, - { 1e7 + .49, 1e7 }, - { 1e7 + .51, 1e7 + 1 }, - { 1e12 + .49, 1e12 }, - { 1e12 + .51, 1e12 + 1 }, - { 1e40, 1e40 } - }; - - for ( size_t i = 0; i < G_N_ELEMENTS(cases); i++ ) - { - nonneg_round_cases.push_back( cases[i] ); - - Case tmp = {-nonneg_round_cases[i].arg0, -nonneg_round_cases[i].ret}; - nonpos_round_cases.push_back( tmp ); - } - } - - virtual ~RoundTest() - { - } - - static RoundTest *createSuite() { return new RoundTest(); } - static void destroySuite( RoundTest *suite ) { delete suite; } - -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- - - - - void testNonNegRound() - { - for ( size_t i = 0; i < nonneg_round_cases.size(); i++ ) - { - double result = Inkscape::round( nonneg_round_cases[i].arg0 ); - TS_ASSERT_EQUALS( result, nonneg_round_cases[i].ret ); - } - } - - void testNonPosRoung() - { - for ( size_t i = 0; i < nonpos_round_cases.size(); i++ ) - { - double result = Inkscape::round( nonpos_round_cases[i].arg0 ); - TS_ASSERT_EQUALS( result, nonpos_round_cases[i].ret ); - } - } - -}; - - -#endif // SEEN_ROUND_TEST_H - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : - |
