summaryrefslogtreecommitdiff
path: root/tests/test_accumulated.cc
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2015-07-18 20:54:32 +0200
committerMurray Cumming <murrayc@murrayc.com>2015-07-18 21:04:31 +0200
commit4fce962cd6599488381c997bbfcbb55c270b5a00 (patch)
tree295d8b27a34cef67d46cfc21903cbf225d8bf9c0 /tests/test_accumulated.cc
parent264cfc06dbb26a3471900a3425bec336f4028405 (diff)
downloadsigc++-4fce962cd6599488381c997bbfcbb55c270b5a00.tar.gz
C++11: Use auto.
Trying to avoid using auto where its a specific type that we are trying to test for.
Diffstat (limited to 'tests/test_accumulated.cc')
-rw-r--r--tests/test_accumulated.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_accumulated.cc b/tests/test_accumulated.cc
index 5b3c0ae..50a8d45 100644
--- a/tests/test_accumulated.cc
+++ b/tests/test_accumulated.cc
@@ -73,7 +73,7 @@ struct A : public sigc::trackable
int main(int argc, char* argv[])
{
- TestUtilities* util = TestUtilities::get_instance();
+ auto util = TestUtilities::get_instance();
if (!util->check_command_args(argc, argv))
return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
@@ -108,14 +108,14 @@ int main(int argc, char* argv[])
util->check_result(result_stream,
"foo: 34, A::foo: 206, bar: 52, Mean accumulator: Plain Result (i=11): 97.333");
- std::vector<int> res1 = sig_vec(1);
+ auto res1 = sig_vec(1);
result_stream << "Vector accumulator: Result (i=1): ";
for (std::vector<int>::iterator i = res1.begin(); i != res1.end(); ++i)
result_stream << *i << " ";
util->check_result(result_stream,
"foo: 4, A::foo: 6, bar: 2, Vector accumulator: Result (i=1): 4 6 2 ");
- std::vector<int> res3 = sig_vec(3);
+ auto res3 = sig_vec(3);
result_stream << "Vector accumulator: Result (i=3): ";
for (std::vector<int>::iterator i = res3.begin(); i != res3.end(); ++i)
result_stream << *i << " ";