26 #define EXAMPLE_INI_FILE \
27 "#This is a top comment \n\
31 #This is a section comment \n\
32 #And another line of section comment \n\
33 [Section.SectionOne] \n\
36 Key3 = \"A long text value\" \n\
37 #A top comment for a key \n\
38 CommentedKey = 1 #A side comment for a key\n\
47 #define EXAMPLE_ERROR_1 \
48 "[Unclosed section \n\
54 return QByteArray(EXAMPLE_INI_FILE);
59 return QByteArray(EXAMPLE_ERROR_1);
64 TestReadINI::TestReadINI()
69 bool TestReadINI::executeTest()
92 testLog <<
"Untested";
98 bool TestReadINIVariable::executeTest()
124 testLog <<
"Untested";
130 bool TestReadINIList::compareEntry(
const QString& actual,
const QString& expected)
132 if (actual.compare(expected, Qt::CaseSensitive) != 0)
134 gLog << QString(
"List entry incorrect, expected '%1', got '%2'").arg(expected).arg(actual);
141 bool TestReadINIList::executeTest()
143 const int EXPECTED_LIST_SIZE = 4;
167 testLog <<
"Untested";
173 bool TestDeleteINIVariable::executeTest()
195 testLog <<
"Untested";
201 bool TestDeleteINISection::executeTest()
219 testLog <<
"Untested";
225 bool TestReadINIWithErrors::executeTest()
245 testLog <<
"Untested";
Base class for Test Units.
static QByteArray getExampleINI()
Gets an INI file that is written in a format that is 100% supported by the Ini class.
static QByteArray getExampleError1()
Ini class should detect errors in this example.