diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-06 15:56:40 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-06 15:56:40 -0600 |
commit | e16866e072f94410321d70daedbcb855ea878cac (patch) | |
tree | ee3f52eabde7da1a0e6ca845fb9c2813cf1558cf /kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp | |
parent | a58c20c1a7593631a1b50213c805507ebc16adaf (diff) | |
download | tdelibs-e16866e072f94410321d70daedbcb855ea878cac.tar.gz tdelibs-e16866e072f94410321d70daedbcb855ea878cac.zip |
Actually move the kde files that were renamed in the last commit
Diffstat (limited to 'kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp')
-rw-r--r-- | kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp b/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp deleted file mode 100644 index 3dd197b34..000000000 --- a/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - Tests for KConfig Compiler - - Copyright (c) 2005 by Duncan Mac-Vicar <duncan@kde.org> - - ************************************************************************* - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Lesser General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - ************************************************************************* -*/ - -#include <tqfile.h> -#include <tqstring.h> -#include <kdebug.h> -#include <kunittest/module.h> -#include "kconfigcompiler_test.h" - -using namespace KUnitTest; - -KUNITTEST_MODULE( kunittest_kconfigcompiler_test, "KConfigXT") -KUNITTEST_MODULE_REGISTER_TESTER( KConfigCompiler_Test ) - -typedef const char * CompilerTestSet[]; - -static CompilerTestSet testCases = -{ - "test1.cpp", "test1.h", - "test2.cpp", "test2.h", - "test3.cpp", "test3.h", - "test4.cpp", "test4.h", - "test5.cpp", "test5.h", - "test6.cpp", "test6.h", - "test7.cpp", "test7.h", - "test8a.cpp", "test8a.h", - "test8b.cpp", "test8b.h", - "test9.h", "test9.cpp", - "test_dpointer.cpp", "test_dpointer.h", - NULL -}; - -static CompilerTestSet willFailCases = -{ - // where is that TQDir comming from? - //"test9.cpp", NULL - NULL -}; - - -void KConfigCompiler_Test::allTests() -{ - testExpectedOutput(); -} - -void KConfigCompiler_Test::testExpectedOutput() -{ - uint i = 0; - // Known to pass test cases - while (testCases[ i ]) - { - performCompare(TQString::tqfromLatin1(testCases[ i ])); - ++i; - } - - // broken test cases - i= 0; - while (willFailCases[ i ]) - { - performCompare(TQString::tqfromLatin1(willFailCases[ i ]), true); - ++i; - } -} - -void KConfigCompiler_Test::performCompare(const TQString &fileName, bool fail) -{ - TQFile file(fileName); - TQFile fileRef(TQString::tqfromLatin1(SRCDIR) + TQString::tqfromLatin1("/") + fileName + TQString::tqfromLatin1(".ref")); - - if ( file.open(IO_ReadOnly) && fileRef.open(IO_ReadOnly) ) - { - TQString content = file.readAll(); - TQString contentRef = fileRef.readAll(); - - if (!fail) - CHECK( content, contentRef); - else - XFAIL( content, contentRef); - } - else - { - SKIP("Can't open file for comparision"); - } -} |