Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/Tests/OgreMain/include/StringTests.h @ 1

Last change on this file since 1 was 1, checked in by landauf, 17 years ago
File size: 3.3 KB
Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4    (Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2006 Torus Knot Software Ltd
8Also see acknowledgements in Readme.html
9
10This program is free software; you can redistribute it and/or modify it under
11the terms of the GNU Lesser General Public License as published by the Free Software
12Foundation; either version 2 of the License, or (at your option) any later
13version.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License along with
20this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21Place - Suite 330, Boston, MA 02111-1307, USA, or go to
22http://www.gnu.org/copyleft/lesser.txt.
23
24You may alternatively use this source under the terms of a specific version of
25the OGRE Unrestricted License provided you have obtained such a license from
26Torus Knot Software Ltd.
27-----------------------------------------------------------------------------
28*/
29#include <cppunit/TestFixture.h>
30#include <cppunit/extensions/HelperMacros.h>
31#include "OgreString.h"
32
33class StringTests : public CppUnit::TestFixture
34{
35    // CppUnit macros for setting up the test suite
36    CPPUNIT_TEST_SUITE( StringTests );
37    CPPUNIT_TEST(testSplitFileNameNoPath);
38    CPPUNIT_TEST(testSplitFileNameRelativePath);
39    CPPUNIT_TEST(testSplitFileNameAbsolutePath);
40    CPPUNIT_TEST(testMatchCaseSensitive);
41    CPPUNIT_TEST(testMatchCaseInSensitive);
42        CPPUNIT_TEST(testMatchGlobAll);
43    CPPUNIT_TEST(testMatchGlobStart);
44    CPPUNIT_TEST(testMatchGlobEnd);
45    CPPUNIT_TEST(testMatchGlobStartAndEnd);
46    CPPUNIT_TEST(testMatchGlobMiddle);
47    CPPUNIT_TEST(testMatchSuperGlobtastic);
48        CPPUNIT_TEST(testParseReal);
49        CPPUNIT_TEST(testParseInt);
50        CPPUNIT_TEST(testParseLong);
51        CPPUNIT_TEST(testParseUnsignedLong);
52        CPPUNIT_TEST(testParseVector3);
53        CPPUNIT_TEST(testParseMatrix4);
54        CPPUNIT_TEST(testParseQuaternion);
55        CPPUNIT_TEST(testParseBool);
56        CPPUNIT_TEST(testParseColourValue);
57
58    CPPUNIT_TEST_SUITE_END();
59protected:
60        Ogre::String testFileNoPath;
61        Ogre::String testFileRelativePathWindows;
62        Ogre::String testFileRelativePathUnix;
63        Ogre::String testFileAbsolutePathWindows;
64        Ogre::String testFileAbsolutePathUnix;
65public:
66    void setUp();
67    void tearDown();
68        // StringUtil::splitFileName tests
69    void testSplitFileNameNoPath();
70    void testSplitFileNameRelativePath();
71    void testSplitFileNameAbsolutePath();
72        // StringUtil::match tests
73    void testMatchCaseSensitive();
74    void testMatchCaseInSensitive();
75        void testMatchGlobAll();
76        void testMatchGlobStart();
77        void testMatchGlobEnd();
78        void testMatchGlobStartAndEnd();
79        void testMatchGlobMiddle();
80        void testMatchSuperGlobtastic();
81        // StringConverter tests
82        void testParseReal();
83        void testParseInt();
84        void testParseLong();
85        void testParseUnsignedLong();
86        void testParseVector3();
87        void testParseMatrix4();
88        void testParseQuaternion();
89        void testParseBool();
90        void testParseColourValue();
91
92
93};
Note: See TracBrowser for help on using the repository browser.