diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
| commit | 169dff19d4da8d76e69b8e896aa25b0013639c03 (patch) | |
| tree | a0c070fa95188b5cde708ac285e6a2db9df4a83f /testfiles/src/color-profile-test.cpp | |
| parent | Avoid creating a new document before opening an old document. (diff) | |
| download | inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.tar.gz inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.zip | |
modernize loops
Diffstat (limited to 'testfiles/src/color-profile-test.cpp')
| -rw-r--r-- | testfiles/src/color-profile-test.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/testfiles/src/color-profile-test.cpp b/testfiles/src/color-profile-test.cpp index dcee8427a..4ed8b3655 100644 --- a/testfiles/src/color-profile-test.cpp +++ b/testfiles/src/color-profile-test.cpp @@ -70,9 +70,9 @@ TEST_F(ColorProfileTest, SetRenderingIntent) {"auto2", (guint)Inkscape::RENDERING_INTENT_UNKNOWN}, }; - for ( size_t i = 0; i < G_N_ELEMENTS( cases ); i++ ) { - _prof->setKeyValue( SP_ATTR_RENDERING_INTENT, cases[i].attr); - ASSERT_EQ( (guint)cases[i].intVal, _prof->rendering_intent ) << cases[i].attr; + for (auto i : cases) { + _prof->setKeyValue( SP_ATTR_RENDERING_INTENT, i.attr); + ASSERT_EQ( (guint)i.intVal, _prof->rendering_intent ) << i.attr; } } @@ -83,11 +83,11 @@ TEST_F(ColorProfileTest, SetLocal) "something", }; - for ( size_t i = 0; i < G_N_ELEMENTS( cases ); i++ ) { - _prof->setKeyValue( SP_ATTR_LOCAL, cases[i]); + for (auto & i : cases) { + _prof->setKeyValue( SP_ATTR_LOCAL, i); ASSERT_TRUE( _prof->local != NULL ); if ( _prof->local ) { - ASSERT_EQ( std::string(cases[i]), _prof->local ); + ASSERT_EQ( std::string(i), _prof->local ); } } _prof->setKeyValue( SP_ATTR_LOCAL, NULL); @@ -101,11 +101,11 @@ TEST_F(ColorProfileTest, SetName) "something", }; - for ( size_t i = 0; i < G_N_ELEMENTS( cases ); i++ ) { - _prof->setKeyValue( SP_ATTR_NAME, cases[i]); + for (auto & i : cases) { + _prof->setKeyValue( SP_ATTR_NAME, i); ASSERT_TRUE( _prof->name != NULL ); if ( _prof->name ) { - ASSERT_EQ( std::string(cases[i]), _prof->name ); + ASSERT_EQ( std::string(i), _prof->name ); } } _prof->setKeyValue( SP_ATTR_NAME, NULL ); |
