File indexing completed on 2024-04-28 05:52:32

0001 /*
0002     This file is part of the Okteta Core library, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2006, 2011 Friedrich W. H. Kossebau <kossebau@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 
0009 #ifndef CHARCODECIFTEST_HPP
0010 #define CHARCODECIFTEST_HPP
0011 
0012 // Qt
0013 #include <QObject>
0014 
0015 namespace Okteta {
0016 class CharCodec;
0017 
0018 class CharCodecIfTest : public QObject
0019 {
0020     Q_OBJECT
0021 
0022 protected:
0023     CharCodecIfTest();
0024 
0025 protected: // API to be implemented
0026     virtual CharCodec* createCodec() = 0;
0027     virtual void deleteCodec(CharCodec* codec) = 0;
0028 
0029 private Q_SLOTS: // test functions
0030     void init();
0031     void cleanup();
0032 
0033     void testEncodeDecode_data();
0034     void testEncodeDecode();
0035 
0036 private:
0037     /** pointer to the buffer to test */
0038     CharCodec* mCharCodec = nullptr;
0039 };
0040 
0041 inline CharCodecIfTest::CharCodecIfTest() = default;
0042 
0043 }
0044 
0045 #endif