~tatokis/unity/gcc-72-errors

« back to all changes in this revision

Viewing changes to tests/test_icon_loader.cpp

  • Committer: Bileto Bot
  • Author(s): Marco Trevisan (Treviño)
  • Date: 2017-09-25 16:03:32 UTC
  • mfrom: (4253.1.17 tests-split-and-cleanup)
  • Revision ID: ci-train-bot@canonical.com-20170925160332-1963tgyjcd41j02e
Tests: split unit tests in single binaries, enable unstable tests

Use CMake foo, for getting the best for running tests in single mode
and generating smart targets for them

Approved by: Andrea Azzarone

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
  EXPECT_EQ(&icon_loader, &IconLoader::GetDefault());
105
105
}
106
106
 
107
 
TEST_F(TestIconLoader, UNSTABLE_TEST(TestGetOneIcon))
 
107
TEST_F(TestIconLoader, UNSTABLE_TEST (TestGetOneIcon))
108
108
{
109
109
  LoadResult load_result;
110
110
 
118
118
  EXPECT_TRUE(IsValidPixbuf(load_result.pixbuf));
119
119
}
120
120
 
121
 
TEST_F(TestIconLoader, UNSTABLE_TEST(TestGetAnnotatedIcon))
122
 
{
123
 
  LoadResult load_result;
124
 
 
125
 
  auto handle = icon_loader.LoadFromGIconString(". UnityProtocolAnnotatedIcon %7B'base-icon':%20%3C'cmake'%3E,%20'ribbon':%20%3C'foo'%3E%7D", -1, 48, sigc::mem_fun(load_result,
126
 
        &LoadResult::IconLoaded));
127
 
  handles_.push_back(handle);
128
 
 
129
 
  Utils::WaitPendingEvents(WAIT_TIMEOUT);
130
 
  Utils::WaitUntilMSec(load_result.got_callback, WAIT_TIMEOUT);
131
 
  EXPECT_TRUE(load_result.got_callback);
132
 
  EXPECT_TRUE(IsValidPixbuf(load_result.pixbuf));
133
 
}
134
 
 
135
 
TEST_F(TestIconLoader, UNSTABLE_TEST(TestGetColorizedIcon))
136
 
{
137
 
  LoadResult load_result;
138
 
 
139
 
  auto handle = icon_loader.LoadFromGIconString(". UnityProtocolAnnotatedIcon %7B'base-icon':%20%3C'cmake'%3E,%20'colorize-value':%20%3Cuint32%204278190335%3E%7D", -1, 48, sigc::mem_fun(load_result,
140
 
        &LoadResult::IconLoaded));
141
 
  handles_.push_back(handle);
142
 
 
143
 
  Utils::WaitPendingEvents(WAIT_TIMEOUT);
144
 
  Utils::WaitUntilMSec(load_result.got_callback, WAIT_TIMEOUT);
145
 
  EXPECT_TRUE(load_result.got_callback);
146
 
  EXPECT_TRUE(IsValidPixbuf(load_result.pixbuf));
147
 
}
148
 
 
149
 
TEST_F(TestIconLoader, UNSTABLE_TEST(TestGetOneIconManyTimes))
 
121
TEST_F(TestIconLoader, TestGetAnnotatedIcon)
 
122
{
 
123
  LoadResult load_result;
 
124
 
 
125
  auto handle = icon_loader.LoadFromGIconString(". UnityProtocolAnnotatedIcon %7B'base-icon':%20%3C'python'%3E,%20'ribbon':%20%3C'foo'%3E%7D", -1, 48, sigc::mem_fun(load_result,
 
126
        &LoadResult::IconLoaded));
 
127
  handles_.push_back(handle);
 
128
 
 
129
  Utils::WaitPendingEvents(WAIT_TIMEOUT);
 
130
  Utils::WaitUntilMSec(load_result.got_callback, WAIT_TIMEOUT);
 
131
  EXPECT_TRUE(load_result.got_callback);
 
132
  EXPECT_TRUE(IsValidPixbuf(load_result.pixbuf));
 
133
}
 
134
 
 
135
TEST_F(TestIconLoader, TestGetColorizedIcon)
 
136
{
 
137
  LoadResult load_result;
 
138
 
 
139
  auto handle = icon_loader.LoadFromGIconString(". UnityProtocolAnnotatedIcon %7B'base-icon':%20%3C'python'%3E,%20'colorize-value':%20%3Cuint32%204278190335%3E%7D", -1, 48, sigc::mem_fun(load_result,
 
140
        &LoadResult::IconLoaded));
 
141
  handles_.push_back(handle);
 
142
 
 
143
  Utils::WaitPendingEvents(WAIT_TIMEOUT);
 
144
  Utils::WaitUntilMSec(load_result.got_callback, WAIT_TIMEOUT);
 
145
  EXPECT_TRUE(load_result.got_callback);
 
146
  EXPECT_TRUE(IsValidPixbuf(load_result.pixbuf));
 
147
}
 
148
 
 
149
TEST_F(TestIconLoader, TestGetOneIconManyTimes)
150
150
{
151
151
  std::vector<LoadResult> results;
152
152
  std::vector<IconLoader::Handle> handles;
176
176
  CheckResults(results);
177
177
}
178
178
 
179
 
TEST_F(TestIconLoader, UNSTABLE_TEST(TestGetManyIcons))
 
179
TEST_F(TestIconLoader, UNSTABLE_TEST (TestGetManyIcons))
180
180
{
181
181
  std::vector<LoadResult> results;
182
182
  int i = 0;
198
198
  CheckResults(results);
199
199
}
200
200
 
201
 
TEST_F(TestIconLoader, UNSTABLE_TEST(TestCancelSome))
 
201
TEST_F(TestIconLoader, UNSTABLE_TEST (TestCancelSome))
202
202
{
203
203
  std::vector<LoadResult> results;
204
204
  std::vector<IconLoader::Handle> handles;