[1] | 1 | /* |
---|
| 2 | ----------------------------------------------------------------------------- |
---|
| 3 | This source file is part of OGRE |
---|
| 4 | (Object-oriented Graphics Rendering Engine) |
---|
| 5 | For the latest info, see http://www.ogre3d.org/ |
---|
| 6 | |
---|
| 7 | Copyright (c) 2000-2006 Torus Knot Software Ltd |
---|
| 8 | Also see acknowledgements in Readme.html |
---|
| 9 | |
---|
| 10 | This program is free software; you can redistribute it and/or modify it under |
---|
| 11 | the terms of the GNU Lesser General Public License as published by the Free Software |
---|
| 12 | Foundation; either version 2 of the License, or (at your option) any later |
---|
| 13 | version. |
---|
| 14 | |
---|
| 15 | This program is distributed in the hope that it will be useful, but WITHOUT |
---|
| 16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
---|
| 17 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. |
---|
| 18 | |
---|
| 19 | You should have received a copy of the GNU Lesser General Public License along with |
---|
| 20 | this program; if not, write to the Free Software Foundation, Inc., 59 Temple |
---|
| 21 | Place - Suite 330, Boston, MA 02111-1307, USA, or go to |
---|
| 22 | http://www.gnu.org/copyleft/lesser.txt. |
---|
| 23 | |
---|
| 24 | You may alternatively use this source under the terms of a specific version of |
---|
| 25 | the OGRE Unrestricted License provided you have obtained such a license from |
---|
| 26 | Torus Knot Software Ltd. |
---|
| 27 | ----------------------------------------------------------------------------- |
---|
| 28 | */ |
---|
| 29 | #include <cppunit/TestFixture.h> |
---|
| 30 | #include <cppunit/extensions/HelperMacros.h> |
---|
| 31 | #include "OgreString.h" |
---|
| 32 | |
---|
| 33 | class 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(); |
---|
| 59 | protected: |
---|
| 60 | Ogre::String testFileNoPath; |
---|
| 61 | Ogre::String testFileRelativePathWindows; |
---|
| 62 | Ogre::String testFileRelativePathUnix; |
---|
| 63 | Ogre::String testFileAbsolutePathWindows; |
---|
| 64 | Ogre::String testFileAbsolutePathUnix; |
---|
| 65 | public: |
---|
| 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 | }; |
---|