summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Mons <edwin.mons@isode.com>2018-10-30 07:24:24 (GMT)
committerEdwin Mons <edwin.mons@isode.com>2018-11-14 10:35:55 (GMT)
commit30639ed8dbb419890eab5a0b46d3a78896c7f22d (patch)
tree62b7a3b19bc3d84bfc0a0d4ac71a79beb0946e8c /Swiften/SASL/UnitTest
parent5758cc48f5f340132d19e79f647dd5d3ad8c54fc (diff)
downloadswift-30639ed8dbb419890eab5a0b46d3a78896c7f22d.zip
swift-30639ed8dbb419890eab5a0b46d3a78896c7f22d.tar.bz2
Fix various uses of numeric_cast in UI bits
Apart from QtUI bits, this addresses use of uncaught numeric cast exceptions in message count handling, the spell parser and the MacOS idle querier. The WindowsServicePrincipalName logic previously had an issue where using ports from 32768 onwards would result in a bad_numeric_cast exception to be thrown. This has been addressed at the same time as the uncaught exceptions, and all ports should work now. The tags file has been extended to ignore more files. Change-Id: I73ced35f06517bee5c58f990d20fa437b40ac84e
Diffstat (limited to 'Swiften/SASL/UnitTest')
-rw-r--r--Swiften/SASL/UnitTest/WindowsServicePrincipalNameTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/SASL/UnitTest/WindowsServicePrincipalNameTest.cpp b/Swiften/SASL/UnitTest/WindowsServicePrincipalNameTest.cpp
index fa07052..ef3a9b3 100644
--- a/Swiften/SASL/UnitTest/WindowsServicePrincipalNameTest.cpp
+++ b/Swiften/SASL/UnitTest/WindowsServicePrincipalNameTest.cpp
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2015 Isode Limited. 2 * Copyright (c) 2015-2018 Isode Limited.
3 * All rights reserved. 3 * All rights reserved.
4 * See the COPYING file for more information. 4 * See the COPYING file for more information.
5 */ 5 */
@@ -97,16 +97,16 @@ class WindowsServicePrincipalNameTest : public CppUnit::TestFixture {
97 WindowsServicePrincipalName spn("adlon.isode.net"); 97 WindowsServicePrincipalName spn("adlon.isode.net");
98 98
99 spn.setInstanceName("mlink.adlon.isode.net"); 99 spn.setInstanceName("mlink.adlon.isode.net");
100 spn.setInstancePort(6222); 100 spn.setInstancePort(55222);
101 CPPUNIT_ASSERT_EQUAL(spn.toString(), std::string("xmpp/mlink.adlon.isode.net:6222/adlon.isode.net")); 101 CPPUNIT_ASSERT_EQUAL(spn.toString(), std::string("xmpp/mlink.adlon.isode.net:55222/adlon.isode.net"));
102 102
103 spn.setInstancePort(0); 103 spn.setInstancePort(0);
104 CPPUNIT_ASSERT_EQUAL(spn.toString(), std::string("xmpp/mlink.adlon.isode.net/adlon.isode.net")); 104 CPPUNIT_ASSERT_EQUAL(spn.toString(), std::string("xmpp/mlink.adlon.isode.net/adlon.isode.net"));
105 105
106 WindowsServicePrincipalName spn2("mlink.adlon.isode.net"); 106 WindowsServicePrincipalName spn2("mlink.adlon.isode.net");
107 107
108 spn2.setInstancePort(6222); 108 spn2.setInstancePort(55222);
109 CPPUNIT_ASSERT_EQUAL(spn2.toString(), std::string("xmpp/mlink.adlon.isode.net:6222")); 109 CPPUNIT_ASSERT_EQUAL(spn2.toString(), std::string("xmpp/mlink.adlon.isode.net:55222"));
110 110
111 spn2.setInstancePort(0); 111 spn2.setInstancePort(0);
112 CPPUNIT_ASSERT_EQUAL(spn2.toString(), std::string("xmpp/mlink.adlon.isode.net")); 112 CPPUNIT_ASSERT_EQUAL(spn2.toString(), std::string("xmpp/mlink.adlon.isode.net"));