From 9c4b0170bfc321a31c6f3d0f7cd34edfa74fe1f4 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sat, 15 Oct 2016 20:26:34 +0200 Subject: Make all current written tests pass Fixes a couple of issues with the tests. Also, a type in prefs.h is "short" while it's actually a boolean, this made me write the wrong testcase for this. Fixed this by setting the Qt wrapper to bool, but I didn't changed the c implementation because I tought I could break something. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- tests/testpreferences.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/testpreferences.cpp b/tests/testpreferences.cpp index 069e78db9..684795891 100644 --- a/tests/testpreferences.cpp +++ b/tests/testpreferences.cpp @@ -284,29 +284,29 @@ void TestPreferences::testPreferences() auto proxy = pref->proxy; proxy->setType(2); proxy->setPort(80); - proxy->setAuth((short) 5); + proxy->setAuth(true); proxy->setHost("localhost"); proxy->setUser("unknown"); proxy->setPass("secret"); TEST(proxy->type(),2); TEST(proxy->port(),80); - TEST(proxy->auth(),(short) 5); + TEST(proxy->auth(),true); TEST(proxy->host(),QStringLiteral("localhost")); TEST(proxy->user(),QStringLiteral("unknown")); TEST(proxy->pass(),QStringLiteral("secret")); proxy->setType(3); proxy->setPort(8080); - proxy->setAuth((short) 6); + proxy->setAuth(false); proxy->setHost("127.0.0.1"); proxy->setUser("unknown_1"); proxy->setPass("secret_1"); TEST(proxy->type(),3); TEST(proxy->port(),8080); - TEST(proxy->auth(),(short) 6); - TEST(proxy->host(),QStringLiteral("localhost_1")); + TEST(proxy->auth(),false); + TEST(proxy->host(),QStringLiteral("127.0.0.1")); TEST(proxy->user(),QStringLiteral("unknown_1")); TEST(proxy->pass(),QStringLiteral("secret_1")); -- cgit v1.2.3-70-g09d2