summaryrefslogtreecommitdiffstats
path: root/src/tests/checks.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-05-24 13:55:19 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-08-03 13:26:11 +0900
commitfbc41d795b8251180e09d003171f346487e7ab25 (patch)
tree6199fae0522a9d4c22a917de9b0b00d31ac4faa4 /src/tests/checks.h
parent9a622918b2f64e81006356124a045ba99cc3765d (diff)
downloadkrecipes-fbc41d79.tar.gz
krecipes-fbc41d79.zip
Fix importers/exporters bugs. Fix tests and add them to build process.
The file `mx2test.txt` is taken from KRecipes 2.1 source code. Other tests have been adjusted based on the tests in KRecipes 2.1 source code. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit dfbafdbb2f7369438a750327544f9084a765e407)
Diffstat (limited to 'src/tests/checks.h')
-rw-r--r--src/tests/checks.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tests/checks.h b/src/tests/checks.h
index e697814..618d0c0 100644
--- a/src/tests/checks.h
+++ b/src/tests/checks.h
@@ -30,10 +30,10 @@ void check( const RatingList &rating, const RatingList &base );
bool check(const TQString &txt, const TQString &a, const TQString &b)
{
if ( a != b ) {
- cout << "ERROR: Tested " << txt.latin1() << ", expected" << endl;
- cout << "'" << b.latin1() << "' (" << b.length() << " chars)" << endl;
+ cout << "ERROR: Tested " << txt.local8Bit() << ", expected" << endl;
+ cout << "'" << b.local8Bit() << "' (" << b.length() << " chars)" << endl;
cout << "but got" << endl;
- cout << "'" << a.latin1() << "' (" << a.length() << " chars)" << endl;
+ cout << "'" << a.local8Bit() << "' (" << a.length() << " chars)" << endl;
exit( 1 );
}
@@ -43,7 +43,7 @@ bool check(const TQString &txt, const TQString &a, const TQString &b)
bool check(const TQString &txt, int a, int b)
{
if ( a != b ) {
- cout << "ERROR: Tested " << txt.latin1() << ", expected" << endl;
+ cout << "ERROR: Tested " << txt.local8Bit() << ", expected" << endl;
cout << "'" << b << "'" << endl;
cout << "but got" << endl;
cout << "'" << a << "'" << endl;
@@ -56,7 +56,7 @@ bool check(const TQString &txt, int a, int b)
bool check(const TQString &txt, double a, double b)
{
if ( fabs(a - b) > 1e-10 ) {
- cout << "ERROR: Tested " << txt.latin1() << ", expected" << endl;
+ cout << "ERROR: Tested " << txt.local8Bit() << ", expected" << endl;
cout << "'" << b << "'" << endl;
cout << "but got" << endl;
cout << "'" << a << "'" << endl;
@@ -70,7 +70,7 @@ bool check(const TQString &txt, const TQPixmap &a, const TQPixmap &b)
{
if ( a.size() != b.size() ) {
- cout << "ERROR: Tested " << txt.latin1() << ": photos differ" << endl;
+ cout << "ERROR: Tested " << txt.local8Bit() << ": photos differ" << endl;
// exit( 1 );
}