From: Maxim Mamontov Date: Mon, 19 Sep 2011 20:12:50 +0000 (+0300) Subject: Add explicit casts for reconnect-on-tariff-change tests to shut up gcc X-Git-Tag: 2.408-rc1~21 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/a9f633a23d4fdd32c3185d13f8987a8ff7a8f82d?ds=inline Add explicit casts for reconnect-on-tariff-change tests to shut up gcc --- diff --git a/tests/test_reconnect_on_tariff_change.cpp b/tests/test_reconnect_on_tariff_change.cpp index 603f60df..8e2bb2f9 100644 --- a/tests/test_reconnect_on_tariff_change.cpp +++ b/tests/test_reconnect_on_tariff_change.cpp @@ -68,15 +68,14 @@ namespace tut user.AddConnectedAfterNotifier(&connectionNotifier); - USER_PROPERTY & cash(user.GetProperty().cash); USER_PROPERTY & tariffName(user.GetProperty().tariffName); USER_PROPERTY & ips(user.GetProperty().ips); ips = StrToIPS("*"); ensure_equals("user.connected = false", user.GetConnected(), false); - ensure_equals("connects = 0", connectionNotifier.GetConnects(), 0); - ensure_equals("disconnects = 0", connectionNotifier.GetDisconnects(), 0); + ensure_equals("connects = 0", connectionNotifier.GetConnects(), static_cast(0)); + ensure_equals("disconnects = 0", connectionNotifier.GetDisconnects(), static_cast(0)); ensure_equals("user.tariffName == NO_TARIFF_NAME", user.GetProperty().tariffName.ConstData(), NO_TARIFF_NAME); @@ -86,8 +85,8 @@ namespace tut ensure_equals("user.authorised_by = true", user.IsAuthorizedBy(&auth), true); ensure_equals("user.connected = true", user.GetConnected(), true); - ensure_equals("connects = 1", connectionNotifier.GetConnects(), 1); - ensure_equals("disconnects = 0", connectionNotifier.GetDisconnects(), 0); + ensure_equals("connects = 1", connectionNotifier.GetConnects(), static_cast(1)); + ensure_equals("disconnects = 0", connectionNotifier.GetDisconnects(), static_cast(0)); tariffName = "test"; ensure_equals("user.tariffName == 'test'", user.GetProperty().tariffName.ConstData(), "test"); @@ -95,8 +94,8 @@ namespace tut ensure_equals("user.authorised_by = true", user.IsAuthorizedBy(&auth), true); ensure_equals("user.connected = true", user.GetConnected(), true); - ensure_equals("connects = 1", connectionNotifier.GetConnects(), 1); - ensure_equals("disconnects = 0", connectionNotifier.GetDisconnects(), 0); + ensure_equals("connects = 1", connectionNotifier.GetConnects(), static_cast(1)); + ensure_equals("disconnects = 0", connectionNotifier.GetDisconnects(), static_cast(0)); } @@ -126,15 +125,14 @@ namespace tut user.AddConnectedAfterNotifier(&connectionNotifier); - USER_PROPERTY & cash(user.GetProperty().cash); USER_PROPERTY & tariffName(user.GetProperty().tariffName); USER_PROPERTY & ips(user.GetProperty().ips); ips = StrToIPS("*"); ensure_equals("user.connected = false", user.GetConnected(), false); - ensure_equals("connects = 0", connectionNotifier.GetConnects(), 0); - ensure_equals("disconnects = 0", connectionNotifier.GetDisconnects(), 0); + ensure_equals("connects = 0", connectionNotifier.GetConnects(), static_cast(0)); + ensure_equals("disconnects = 0", connectionNotifier.GetDisconnects(), static_cast(0)); ensure_equals("user.tariffName == NO_TARIFF_NAME", user.GetProperty().tariffName.ConstData(), NO_TARIFF_NAME); @@ -144,8 +142,8 @@ namespace tut ensure_equals("user.authorised_by = true", user.IsAuthorizedBy(&auth), true); ensure_equals("user.connected = true", user.GetConnected(), true); - ensure_equals("connects = 1", connectionNotifier.GetConnects(), 1); - ensure_equals("disconnects = 0", connectionNotifier.GetDisconnects(), 0); + ensure_equals("connects = 1", connectionNotifier.GetConnects(), static_cast(1)); + ensure_equals("disconnects = 0", connectionNotifier.GetDisconnects(), static_cast(0)); tariffName = "test"; ensure_equals("user.tariffName == 'test'", user.GetProperty().tariffName.ConstData(), "test"); @@ -153,8 +151,8 @@ namespace tut ensure_equals("user.authorised_by = true", user.IsAuthorizedBy(&auth), true); ensure_equals("user.connected = true", user.GetConnected(), true); - ensure_equals("connects = 2", connectionNotifier.GetConnects(), 2); - ensure_equals("disconnects = 1", connectionNotifier.GetDisconnects(), 1); + ensure_equals("connects = 2", connectionNotifier.GetConnects(), static_cast(2)); + ensure_equals("disconnects = 1", connectionNotifier.GetDisconnects(), static_cast(1)); } }