Merge lp:~michihenning/thumbnailer/fix-warnings into lp:thumbnailer/devel

Proposed by Michi Henning
Status: Merged
Approved by: Michi Henning
Approved revision: 366
Merged at revision: 367
Proposed branch: lp:~michihenning/thumbnailer/fix-warnings
Merge into: lp:thumbnailer/devel
Diff against target: 567 lines (+107/-55)
25 files modified
doc/libthumbnailer-qt/examples/qt_example_test.cpp (+4/-0)
include/internal/image.h (+1/-1)
src/image.cpp (+1/-1)
tests/art_extractor/art_extractor_test.cpp (+1/-1)
tests/backoff_adjuster/backoff_adjuster_test.cpp (+1/-1)
tests/check_access/check_access_test.cpp (+1/-1)
tests/dbus/dbus_test.cpp (+5/-5)
tests/download/download_test.cpp (+1/-1)
tests/file_io/file_io_test.cpp (+2/-2)
tests/file_lock/file_lock_test.cpp (+1/-1)
tests/gmock_nowarn.h (+24/-0)
tests/gobj_ptr/gobj_ptr_test.cpp (+9/-9)
tests/gtest_nowarn.h (+24/-0)
tests/image-provider/image-provider_test.cpp (+1/-1)
tests/image/image_test.cpp (+12/-12)
tests/libthumbnailer-qt/libthumbnailer-qt_test.cpp (+1/-1)
tests/recovery/MockCache.h (+1/-1)
tests/safe_strerror/safe_strerror_test.cpp (+1/-1)
tests/settings/settings_test.cpp (+1/-1)
tests/slow-vs-thumb/slow-vs-thumb_test.cpp (+1/-1)
tests/stress/stress_test.cpp (+1/-1)
tests/thumbnailer-admin/thumbnailer-admin_test.cpp (+10/-10)
tests/thumbnailer/thumbnailer_test.cpp (+1/-1)
tests/version/version_test.cpp (+1/-1)
tests/vs-thumb/vs-thumb_test.cpp (+1/-1)
To merge this branch: bzr merge lp:~michihenning/thumbnailer/fix-warnings
Reviewer Review Type Date Requested Status
unity-api-1-bot continuous-integration Approve
James Henstridge Approve
Review via email: mp+314889@code.launchpad.net

Commit message

Fixed a bunch of compiler warnings on zesty.

Description of the change

Fixed a bunch of compiler warnings on zesty.

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:366
https://jenkins.canonical.com/unity-api-1/job/lp-thumbnailer-ci/13/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1415
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1422
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1200
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1200/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1200
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1200/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1200
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1200/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1200
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1200/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1200
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1200/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1200
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1200/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-thumbnailer-ci/13/rebuild

review: Approve (continuous-integration)
Revision history for this message
James Henstridge (jamesh) wrote :

Looks good.

review: Approve
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://jenkins.canonical.com/unity-api-1/job/lp-thumbnailer-autoland/120/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/1508/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1515
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1293/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1293
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1293/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1293
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1293/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1293
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1293/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1293/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1293
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1293/artifact/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Revision history for this message
unity-api-1-bot (unity-api-1-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'doc/libthumbnailer-qt/examples/qt_example_test.cpp'
--- doc/libthumbnailer-qt/examples/qt_example_test.cpp 2016-09-23 01:39:55 +0000
+++ doc/libthumbnailer-qt/examples/qt_example_test.cpp 2017-01-17 04:15:24 +0000
@@ -115,7 +115,11 @@
115#include <QTemporaryDir>115#include <QTemporaryDir>
116116
117#include <boost/filesystem.hpp>117#include <boost/filesystem.hpp>
118
119#pragma GCC diagnostic push
120#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
118#include <gtest/gtest.h>121#include <gtest/gtest.h>
122#pragma GCC diagnostic pop
119123
120#include <memory>124#include <memory>
121125
122126
=== modified file 'include/internal/image.h'
--- include/internal/image.h 2016-03-02 04:10:45 +0000
+++ include/internal/image.h 2017-01-17 04:15:24 +0000
@@ -61,7 +61,7 @@
6161
62 // Return the pixel value at the (x,y) coordinates as an integer:62 // Return the pixel value at the (x,y) coordinates as an integer:
63 // r << 24 | g << 16 | b << 8 | a63 // r << 24 | g << 16 | b << 8 | a
64 int pixel(int x, int y) const;64 uint32_t pixel(int x, int y) const;
6565
66 // Return a scaled version of the image that fits within the given66 // Return a scaled version of the image that fits within the given
67 // requested size.67 // requested size.
6868
=== modified file 'src/image.cpp'
--- src/image.cpp 2016-02-29 07:04:54 +0000
+++ src/image.cpp 2017-01-17 04:15:24 +0000
@@ -430,7 +430,7 @@
430 return h;430 return h;
431}431}
432432
433int Image::pixel(int x, int y) const433uint32_t Image::pixel(int x, int y) const
434{434{
435 assert(gdk_pixbuf_get_colorspace(pixbuf_.get()) == GDK_COLORSPACE_RGB);435 assert(gdk_pixbuf_get_colorspace(pixbuf_.get()) == GDK_COLORSPACE_RGB);
436 assert(gdk_pixbuf_get_bits_per_sample(pixbuf_.get()) == 8);436 assert(gdk_pixbuf_get_bits_per_sample(pixbuf_.get()) == 8);
437437
=== modified file 'tests/art_extractor/art_extractor_test.cpp'
--- tests/art_extractor/art_extractor_test.cpp 2016-02-09 04:09:37 +0000
+++ tests/art_extractor/art_extractor_test.cpp 2017-01-17 04:15:24 +0000
@@ -23,7 +23,7 @@
23#include <boost/algorithm/string.hpp>23#include <boost/algorithm/string.hpp>
2424
25#include <testsetup.h>25#include <testsetup.h>
26#include <gtest/gtest.h>26#include <gtest_nowarn.h>
2727
28#define AIFF_FILE TESTDATADIR "/testsong.aiff"28#define AIFF_FILE TESTDATADIR "/testsong.aiff"
29#define FLAC_FILE TESTDATADIR "/testsong.flac"29#define FLAC_FILE TESTDATADIR "/testsong.flac"
3030
=== modified file 'tests/backoff_adjuster/backoff_adjuster_test.cpp'
--- tests/backoff_adjuster/backoff_adjuster_test.cpp 2016-01-04 06:09:41 +0000
+++ tests/backoff_adjuster/backoff_adjuster_test.cpp 2017-01-17 04:15:24 +0000
@@ -18,7 +18,7 @@
1818
19#include <internal/backoff_adjuster.h>19#include <internal/backoff_adjuster.h>
2020
21#include <gtest/gtest.h>21#include <gtest_nowarn.h>
2222
23#include <thread>23#include <thread>
2424
2525
=== modified file 'tests/check_access/check_access_test.cpp'
--- tests/check_access/check_access_test.cpp 2015-06-24 01:08:06 +0000
+++ tests/check_access/check_access_test.cpp 2017-01-17 04:15:24 +0000
@@ -18,7 +18,7 @@
1818
19#include <internal/check_access.h>19#include <internal/check_access.h>
2020
21#include <gtest/gtest.h>21#include <gtest_nowarn.h>
22#include <testsetup.h>22#include <testsetup.h>
2323
24#include <cstdio>24#include <cstdio>
2525
=== modified file 'tests/dbus/dbus_test.cpp'
--- tests/dbus/dbus_test.cpp 2016-09-26 00:30:42 +0000
+++ tests/dbus/dbus_test.cpp 2017-01-17 04:15:24 +0000
@@ -25,7 +25,7 @@
25#include "utils/env_var_guard.h"25#include "utils/env_var_guard.h"
2626
27#include <boost/algorithm/string/predicate.hpp>27#include <boost/algorithm/string/predicate.hpp>
28#include <gtest/gtest.h>28#include <gtest_nowarn.h>
29#include <QProcess>29#include <QProcess>
30#include <QSignalSpy>30#include <QSignalSpy>
31#include <QTemporaryDir>31#include <QTemporaryDir>
@@ -423,7 +423,7 @@
423 {423 {
424 CacheStats s = reply.value().full_size_stats;424 CacheStats s = reply.value().full_size_stats;
425 EXPECT_EQ(temp_dir() + "/cache/unity-thumbnailer/images", s.cache_path.toStdString());425 EXPECT_EQ(temp_dir() + "/cache/unity-thumbnailer/images", s.cache_path.toStdString());
426 EXPECT_EQ(1, s.policy);426 EXPECT_EQ(1u, s.policy);
427 EXPECT_EQ(0, s.size);427 EXPECT_EQ(0, s.size);
428 EXPECT_EQ(0, s.size_in_bytes);428 EXPECT_EQ(0, s.size_in_bytes);
429 EXPECT_NE(0, s.max_size_in_bytes);429 EXPECT_NE(0, s.max_size_in_bytes);
@@ -444,21 +444,21 @@
444 auto list = s.histogram;444 auto list = s.histogram;
445 for (auto c : list)445 for (auto c : list)
446 {446 {
447 EXPECT_EQ(0, c);447 EXPECT_EQ(0u, c);
448 }448 }
449 }449 }
450450
451 {451 {
452 CacheStats s = reply.value().thumbnail_stats;452 CacheStats s = reply.value().thumbnail_stats;
453 EXPECT_EQ(temp_dir() + "/cache/unity-thumbnailer/thumbnails", s.cache_path.toStdString());453 EXPECT_EQ(temp_dir() + "/cache/unity-thumbnailer/thumbnails", s.cache_path.toStdString());
454 EXPECT_EQ(1, s.policy);454 EXPECT_EQ(1u, s.policy);
455 EXPECT_EQ(0, s.size);455 EXPECT_EQ(0, s.size);
456 }456 }
457457
458 {458 {
459 CacheStats s = reply.value().failure_stats;459 CacheStats s = reply.value().failure_stats;
460 EXPECT_EQ(temp_dir() + "/cache/unity-thumbnailer/failures", s.cache_path.toStdString());460 EXPECT_EQ(temp_dir() + "/cache/unity-thumbnailer/failures", s.cache_path.toStdString());
461 EXPECT_EQ(0, s.policy);461 EXPECT_EQ(0u, s.policy);
462 EXPECT_EQ(0, s.size);462 EXPECT_EQ(0, s.size);
463 }463 }
464464
465465
=== modified file 'tests/download/download_test.cpp'
--- tests/download/download_test.cpp 2015-12-28 05:05:23 +0000
+++ tests/download/download_test.cpp 2017-01-17 04:15:24 +0000
@@ -22,7 +22,7 @@
22#include "utils/artserver.h"22#include "utils/artserver.h"
23#include <testsetup.h>23#include <testsetup.h>
2424
25#include <gtest/gtest.h>25#include <gtest_nowarn.h>
2626
27#include <QSignalSpy>27#include <QSignalSpy>
28#include <QUrl>28#include <QUrl>
2929
=== modified file 'tests/file_io/file_io_test.cpp'
--- tests/file_io/file_io_test.cpp 2015-11-30 06:55:46 +0000
+++ tests/file_io/file_io_test.cpp 2017-01-17 04:15:24 +0000
@@ -19,7 +19,7 @@
19#include <internal/file_io.h>19#include <internal/file_io.h>
2020
21#include <boost/algorithm/string.hpp>21#include <boost/algorithm/string.hpp>
22#include <gtest/gtest.h>22#include <gtest_nowarn.h>
23#include <testsetup.h>23#include <testsetup.h>
2424
25#include <fcntl.h>25#include <fcntl.h>
@@ -34,7 +34,7 @@
34 ASSERT_NE(-1, stat(in_file.c_str(), &st));34 ASSERT_NE(-1, stat(in_file.c_str(), &st));
3535
36 string data = read_file(in_file);36 string data = read_file(in_file);
37 ASSERT_EQ(st.st_size, data.size());37 ASSERT_EQ(unsigned(st.st_size), data.size());
3838
39 string out_file = TESTBINDIR "/testimage.jpg";39 string out_file = TESTBINDIR "/testimage.jpg";
40 write_file(out_file, data);40 write_file(out_file, data);
4141
=== modified file 'tests/file_lock/file_lock_test.cpp'
--- tests/file_lock/file_lock_test.cpp 2016-01-09 04:25:19 +0000
+++ tests/file_lock/file_lock_test.cpp 2017-01-17 04:15:24 +0000
@@ -20,7 +20,7 @@
2020
21#include <unity/UnityExceptions.h>21#include <unity/UnityExceptions.h>
2222
23#include <gtest/gtest.h>23#include <gtest_nowarn.h>
2424
25using namespace std;25using namespace std;
26using namespace unity::thumbnailer::internal;26using namespace unity::thumbnailer::internal;
2727
=== added file 'tests/gmock_nowarn.h'
--- tests/gmock_nowarn.h 1970-01-01 00:00:00 +0000
+++ tests/gmock_nowarn.h 2017-01-17 04:15:24 +0000
@@ -0,0 +1,24 @@
1/*
2 * Copyright (C) 2017 Canonical Ltd
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Michi Henning <michi.henning@canonical.com>
17 */
18
19#pragma once
20
21#pragma GCC diagnostic push
22#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
23#include <gmock/gmock.h>
24#pragma GCC diagnostic pop
025
=== modified file 'tests/gobj_ptr/gobj_ptr_test.cpp'
--- tests/gobj_ptr/gobj_ptr_test.cpp 2015-11-13 04:36:08 +0000
+++ tests/gobj_ptr/gobj_ptr_test.cpp 2017-01-17 04:15:24 +0000
@@ -22,7 +22,7 @@
2222
23#include <internal/gobj_memory.h>23#include <internal/gobj_memory.h>
24#include <glib-object.h>24#include <glib-object.h>
25#include <gtest/gtest.h>25#include <gtest_nowarn.h>
2626
27using namespace std;27using namespace std;
28using namespace unity::thumbnailer::internal;28using namespace unity::thumbnailer::internal;
@@ -87,17 +87,17 @@
87TEST(Gobj_ptr, refcount)87TEST(Gobj_ptr, refcount)
88{88{
89 GObject* o = G_OBJECT(g_object_new(G_TYPE_OBJECT, nullptr));89 GObject* o = G_OBJECT(g_object_new(G_TYPE_OBJECT, nullptr));
90 EXPECT_EQ(1, o->ref_count);90 EXPECT_EQ(1u, o->ref_count);
91 g_object_ref(o);91 g_object_ref(o);
9292
93 {93 {
94 EXPECT_EQ(2, o->ref_count);94 EXPECT_EQ(2u, o->ref_count);
95 gobj_ptr<GObject> u(o);95 gobj_ptr<GObject> u(o);
96 EXPECT_EQ(2, o->ref_count);96 EXPECT_EQ(2u, o->ref_count);
97 // Now it dies and refcount is reduced.97 // Now it dies and refcount is reduced.
98 }98 }
9999
100 EXPECT_EQ(1, o->ref_count);100 EXPECT_EQ(1u, o->ref_count);
101 g_object_unref(o);101 g_object_unref(o);
102}102}
103103
@@ -105,14 +105,14 @@
105{105{
106 GObject* o = G_OBJECT(g_object_new(G_TYPE_OBJECT, nullptr));106 GObject* o = G_OBJECT(g_object_new(G_TYPE_OBJECT, nullptr));
107 gobj_ptr<GObject> u(o);107 gobj_ptr<GObject> u(o);
108 EXPECT_EQ(1, u->ref_count);108 EXPECT_EQ(1u, u->ref_count);
109 gobj_ptr<GObject> u2(u);109 gobj_ptr<GObject> u2(u);
110 EXPECT_EQ(2, u->ref_count);110 EXPECT_EQ(2u, u->ref_count);
111 gobj_ptr<GObject> u3 = u2;111 gobj_ptr<GObject> u3 = u2;
112 EXPECT_EQ(3, u->ref_count);112 EXPECT_EQ(3u, u->ref_count);
113 u3.reset();113 u3.reset();
114 u2.reset();114 u2.reset();
115 EXPECT_EQ(1, u->ref_count);115 EXPECT_EQ(1u, u->ref_count);
116}116}
117117
118TEST(Gobj_ptr, swap)118TEST(Gobj_ptr, swap)
119119
=== added file 'tests/gtest_nowarn.h'
--- tests/gtest_nowarn.h 1970-01-01 00:00:00 +0000
+++ tests/gtest_nowarn.h 2017-01-17 04:15:24 +0000
@@ -0,0 +1,24 @@
1/*
2 * Copyright (C) 2017 Canonical Ltd
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Michi Henning <michi.henning@canonical.com>
17 */
18
19#pragma once
20
21#pragma GCC diagnostic push
22#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
23#include <gtest/gtest.h>
24#pragma GCC diagnostic pop
025
=== modified file 'tests/image-provider/image-provider_test.cpp'
--- tests/image-provider/image-provider_test.cpp 2016-09-26 00:30:42 +0000
+++ tests/image-provider/image-provider_test.cpp 2017-01-17 04:15:24 +0000
@@ -27,7 +27,7 @@
27#include "utils/dbusserver.h"27#include "utils/dbusserver.h"
28#include "utils/testutils.h"28#include "utils/testutils.h"
2929
30#include <gtest/gtest.h>30#include <gtest_nowarn.h>
31#include <QGuiApplication>31#include <QGuiApplication>
32#include <QImage>32#include <QImage>
33#include <QQuickImageProvider>33#include <QQuickImageProvider>
3434
=== modified file 'tests/image/image_test.cpp'
--- tests/image/image_test.cpp 2016-02-29 07:04:54 +0000
+++ tests/image/image_test.cpp 2017-01-17 04:15:24 +0000
@@ -19,7 +19,7 @@
19#include <internal/image.h>19#include <internal/image.h>
2020
21#include <boost/algorithm/string.hpp>21#include <boost/algorithm/string.hpp>
22#include <gtest/gtest.h>22#include <gtest_nowarn.h>
23#include <sys/types.h>23#include <sys/types.h>
24#include <fcntl.h>24#include <fcntl.h>
2525
@@ -53,8 +53,8 @@
53 EXPECT_EQ(480, i.height());53 EXPECT_EQ(480, i.height());
54 EXPECT_EQ(0xFE0000FF, i.pixel(0, 0));54 EXPECT_EQ(0xFE0000FF, i.pixel(0, 0));
55 EXPECT_EQ(0xFFFF00FF, i.pixel(639, 0));55 EXPECT_EQ(0xFFFF00FF, i.pixel(639, 0));
56 EXPECT_EQ(0x00FF01FF, i.pixel(639, 479));56 EXPECT_EQ(0x00FF01FFu, i.pixel(639, 479));
57 EXPECT_EQ(0x0000FEFF, i.pixel(0, 479));57 EXPECT_EQ(0x0000FEFFu, i.pixel(0, 479));
58 EXPECT_FALSE(i.has_alpha());58 EXPECT_FALSE(i.has_alpha());
5959
60 // Move constructor60 // Move constructor
@@ -251,8 +251,8 @@
251 EXPECT_EQ(150, img.height());251 EXPECT_EQ(150, img.height());
252 EXPECT_EQ(0xFE0000FF, img.pixel(0, 0));252 EXPECT_EQ(0xFE0000FF, img.pixel(0, 0));
253 EXPECT_EQ(0xFFFF00FF, img.pixel(199, 0));253 EXPECT_EQ(0xFFFF00FF, img.pixel(199, 0));
254 EXPECT_EQ(0x00FF01FF, img.pixel(199, 149));254 EXPECT_EQ(0x00FF01FFu, img.pixel(199, 149));
255 EXPECT_EQ(0x0000FEFF, img.pixel(0, 149));255 EXPECT_EQ(0x0000FEFFu, img.pixel(0, 149));
256 }256 }
257}257}
258258
@@ -267,8 +267,8 @@
267 EXPECT_EQ(480, img.height());267 EXPECT_EQ(480, img.height());
268 EXPECT_EQ(0xFE0000FF, img.pixel(0, 0));268 EXPECT_EQ(0xFE0000FF, img.pixel(0, 0));
269 EXPECT_EQ(0xFFFF00FF, img.pixel(639, 0));269 EXPECT_EQ(0xFFFF00FF, img.pixel(639, 0));
270 EXPECT_EQ(0x00FF01FF, img.pixel(639, 479));270 EXPECT_EQ(0x00FF01FFu, img.pixel(639, 479));
271 EXPECT_EQ(0x0000FEFF, img.pixel(0, 479));271 EXPECT_EQ(0x0000FEFFu, img.pixel(0, 479));
272272
273 // Scaled version273 // Scaled version
274 img = Image(data, QSize(320, 240));274 img = Image(data, QSize(320, 240));
@@ -276,8 +276,8 @@
276 EXPECT_EQ(240, img.height());276 EXPECT_EQ(240, img.height());
277 EXPECT_EQ(0xFE0000FF, img.pixel(0, 0));277 EXPECT_EQ(0xFE0000FF, img.pixel(0, 0));
278 EXPECT_EQ(0xFFFF00FF, img.pixel(319, 0));278 EXPECT_EQ(0xFFFF00FF, img.pixel(319, 0));
279 EXPECT_EQ(0x00FF01FF, img.pixel(319, 239));279 EXPECT_EQ(0x00FF01FFu, img.pixel(319, 239));
280 EXPECT_EQ(0x0000FEFF, img.pixel(0, 239));280 EXPECT_EQ(0x0000FEFFu, img.pixel(0, 239));
281281
282 // This version will be produced from the thumbnail, which has282 // This version will be produced from the thumbnail, which has
283 // been tinted to distinguish it from the original.283 // been tinted to distinguish it from the original.
@@ -448,7 +448,7 @@
448 Image img(fd.get(), QSize(400, 400));448 Image img(fd.get(), QSize(400, 400));
449 EXPECT_EQ(200, img.width());449 EXPECT_EQ(200, img.width());
450 EXPECT_EQ(200, img.height());450 EXPECT_EQ(200, img.height());
451 EXPECT_EQ(0x0, img.pixel(0, 0));451 EXPECT_EQ(0x0u, img.pixel(0, 0));
452 EXPECT_EQ(0xFF0000FF, img.pixel(100, 100));452 EXPECT_EQ(0xFF0000FF, img.pixel(100, 100));
453 EXPECT_TRUE(img.has_alpha());453 EXPECT_TRUE(img.has_alpha());
454}454}
@@ -461,7 +461,7 @@
461 Image img(fd.get(), QSize());461 Image img(fd.get(), QSize());
462 EXPECT_EQ(200, img.width());462 EXPECT_EQ(200, img.width());
463 EXPECT_EQ(200, img.height());463 EXPECT_EQ(200, img.height());
464 EXPECT_EQ(0x0, img.pixel(0, 0));464 EXPECT_EQ(0x0u, img.pixel(0, 0));
465 EXPECT_EQ(0xFF0000FF, img.pixel(100, 100));465 EXPECT_EQ(0xFF0000FF, img.pixel(100, 100));
466 EXPECT_TRUE(img.has_alpha());466 EXPECT_TRUE(img.has_alpha());
467}467}
@@ -474,7 +474,7 @@
474 Image img(fd.get(), QSize(400, 400));474 Image img(fd.get(), QSize(400, 400));
475 EXPECT_EQ(200, img.width());475 EXPECT_EQ(200, img.width());
476 EXPECT_EQ(200, img.height());476 EXPECT_EQ(200, img.height());
477 EXPECT_EQ(0x0, img.pixel(0, 0));477 EXPECT_EQ(0x0u, img.pixel(0, 0));
478 EXPECT_EQ(0xFF0000FF, img.pixel(100, 100));478 EXPECT_EQ(0xFF0000FF, img.pixel(100, 100));
479 EXPECT_TRUE(img.has_alpha());479 EXPECT_TRUE(img.has_alpha());
480}480}
481481
=== modified file 'tests/libthumbnailer-qt/libthumbnailer-qt_test.cpp'
--- tests/libthumbnailer-qt/libthumbnailer-qt_test.cpp 2016-09-26 00:30:42 +0000
+++ tests/libthumbnailer-qt/libthumbnailer-qt_test.cpp 2017-01-17 04:15:24 +0000
@@ -43,7 +43,7 @@
4343
44#include <boost/algorithm/string/predicate.hpp>44#include <boost/algorithm/string/predicate.hpp>
45#include <boost/filesystem.hpp>45#include <boost/filesystem.hpp>
46#include <gtest/gtest.h>46#include <gtest_nowarn.h>
4747
48#include <QSignalSpy>48#include <QSignalSpy>
49#include <QTemporaryDir>49#include <QTemporaryDir>
5050
=== modified file 'tests/recovery/MockCache.h'
--- tests/recovery/MockCache.h 2015-09-01 08:05:02 +0000
+++ tests/recovery/MockCache.h 2017-01-17 04:15:24 +0000
@@ -22,7 +22,7 @@
22#include <core/optional.h>22#include <core/optional.h>
23#include <core/persistent_cache_stats.h>23#include <core/persistent_cache_stats.h>
2424
25#include <gmock/gmock.h>25#include <gmock_nowarn.h>
2626
27#include <chrono>27#include <chrono>
28#include <system_error>28#include <system_error>
2929
=== modified file 'tests/safe_strerror/safe_strerror_test.cpp'
--- tests/safe_strerror/safe_strerror_test.cpp 2015-11-13 04:36:08 +0000
+++ tests/safe_strerror/safe_strerror_test.cpp 2017-01-17 04:15:24 +0000
@@ -17,7 +17,7 @@
17 */17 */
1818
19#include <internal/safe_strerror.h>19#include <internal/safe_strerror.h>
20#include <gtest/gtest.h>20#include <gtest_nowarn.h>
2121
22using namespace unity::thumbnailer::internal;22using namespace unity::thumbnailer::internal;
2323
2424
=== modified file 'tests/settings/settings_test.cpp'
--- tests/settings/settings_test.cpp 2016-01-11 07:33:57 +0000
+++ tests/settings/settings_test.cpp 2017-01-17 04:15:24 +0000
@@ -27,7 +27,7 @@
27#pragma GCC diagnostic ignored "-Wcast-qual"27#pragma GCC diagnostic ignored "-Wcast-qual"
28#include <gio/gio.h>28#include <gio/gio.h>
29#pragma GCC diagnostic pop29#pragma GCC diagnostic pop
30#include <gtest/gtest.h>30#include <gtest_nowarn.h>
31#include <QTemporaryDir>31#include <QTemporaryDir>
3232
33#include <unistd.h>33#include <unistd.h>
3434
=== modified file 'tests/slow-vs-thumb/slow-vs-thumb_test.cpp'
--- tests/slow-vs-thumb/slow-vs-thumb_test.cpp 2016-09-26 00:50:50 +0000
+++ tests/slow-vs-thumb/slow-vs-thumb_test.cpp 2017-01-17 04:15:24 +0000
@@ -22,7 +22,7 @@
22#include <testsetup.h>22#include <testsetup.h>
2323
24#include <boost/filesystem.hpp>24#include <boost/filesystem.hpp>
25#include <gtest/gtest.h>25#include <gtest_nowarn.h>
26#include <QSignalSpy>26#include <QSignalSpy>
27#include <QTemporaryDir>27#include <QTemporaryDir>
28#include <unity/UnityExceptions.h>28#include <unity/UnityExceptions.h>
2929
=== modified file 'tests/stress/stress_test.cpp'
--- tests/stress/stress_test.cpp 2016-09-26 00:30:42 +0000
+++ tests/stress/stress_test.cpp 2017-01-17 04:15:24 +0000
@@ -40,7 +40,7 @@
40#pragma GCC diagnostic pop40#pragma GCC diagnostic pop
4141
42#include <boost/filesystem.hpp>42#include <boost/filesystem.hpp>
43#include <gtest/gtest.h>43#include <gtest_nowarn.h>
44#include <QSignalSpy>44#include <QSignalSpy>
45#include <QTemporaryDir>45#include <QTemporaryDir>
4646
4747
=== modified file 'tests/thumbnailer-admin/thumbnailer-admin_test.cpp'
--- tests/thumbnailer-admin/thumbnailer-admin_test.cpp 2016-02-29 09:07:16 +0000
+++ tests/thumbnailer-admin/thumbnailer-admin_test.cpp 2017-01-17 04:15:24 +0000
@@ -25,7 +25,7 @@
25#include <testsetup.h>25#include <testsetup.h>
2626
27#include <boost/algorithm/string/predicate.hpp>27#include <boost/algorithm/string/predicate.hpp>
28#include <gtest/gtest.h>28#include <gtest_nowarn.h>
2929
30using namespace std;30using namespace std;
31using namespace boost;31using namespace boost;
@@ -434,8 +434,8 @@
434 EXPECT_EQ(480, img.height());434 EXPECT_EQ(480, img.height());
435 EXPECT_EQ(0xFE0000FF, img.pixel(0, 0));435 EXPECT_EQ(0xFE0000FF, img.pixel(0, 0));
436 EXPECT_EQ(0xFFFF00FF, img.pixel(639, 0));436 EXPECT_EQ(0xFFFF00FF, img.pixel(639, 0));
437 EXPECT_EQ(0x00FF01FF, img.pixel(639, 479));437 EXPECT_EQ(0x00FF01FFu, img.pixel(639, 479));
438 EXPECT_EQ(0x0000FEFF, img.pixel(0, 479));438 EXPECT_EQ(0x0000FEFFu, img.pixel(0, 479));
439}439}
440440
441TEST_F(AdminTest, get_large_thumbnail)441TEST_F(AdminTest, get_large_thumbnail)
@@ -452,8 +452,8 @@
452 EXPECT_EQ(240, img.height());452 EXPECT_EQ(240, img.height());
453 EXPECT_EQ(0xFE0000FF, img.pixel(0, 0));453 EXPECT_EQ(0xFE0000FF, img.pixel(0, 0));
454 EXPECT_EQ(0xFFFF00FF, img.pixel(319, 0));454 EXPECT_EQ(0xFFFF00FF, img.pixel(319, 0));
455 EXPECT_EQ(0x00FF01FF, img.pixel(319, 239));455 EXPECT_EQ(0x00FF01FFu, img.pixel(319, 239));
456 EXPECT_EQ(0x0000FEFF, img.pixel(0, 239));456 EXPECT_EQ(0x0000FEFFu, img.pixel(0, 239));
457}457}
458458
459TEST_F(AdminTest, get_small_thumbnail_square)459TEST_F(AdminTest, get_small_thumbnail_square)
@@ -539,7 +539,7 @@
539 Image img(data);539 Image img(data);
540 EXPECT_EQ(200, img.width());540 EXPECT_EQ(200, img.width());
541 EXPECT_EQ(200, img.height());541 EXPECT_EQ(200, img.height());
542 EXPECT_EQ(0, img.pixel(0, 0));542 EXPECT_EQ(0u, img.pixel(0, 0));
543}543}
544544
545TEST_F(AdminTest, get_png_no_alpha)545TEST_F(AdminTest, get_png_no_alpha)
@@ -572,8 +572,8 @@
572 EXPECT_EQ(480, img.height());572 EXPECT_EQ(480, img.height());
573 EXPECT_EQ(0xFE0000FF, img.pixel(0, 0));573 EXPECT_EQ(0xFE0000FF, img.pixel(0, 0));
574 EXPECT_EQ(0xFFFF00FF, img.pixel(639, 0));574 EXPECT_EQ(0xFFFF00FF, img.pixel(639, 0));
575 EXPECT_EQ(0x00FF01FF, img.pixel(639, 479));575 EXPECT_EQ(0x00FF01FFu, img.pixel(639, 479));
576 EXPECT_EQ(0x0000FEFF, img.pixel(0, 479));576 EXPECT_EQ(0x0000FEFFu, img.pixel(0, 479));
577}577}
578578
579TEST_F(AdminTest, get_with_relative_input_path)579TEST_F(AdminTest, get_with_relative_input_path)
@@ -591,8 +591,8 @@
591 EXPECT_EQ(480, img.height());591 EXPECT_EQ(480, img.height());
592 EXPECT_EQ(0xFE0000FF, img.pixel(0, 0));592 EXPECT_EQ(0xFE0000FF, img.pixel(0, 0));
593 EXPECT_EQ(0xFFFF00FF, img.pixel(639, 0));593 EXPECT_EQ(0xFFFF00FF, img.pixel(639, 0));
594 EXPECT_EQ(0x00FF01FF, img.pixel(639, 479));594 EXPECT_EQ(0x00FF01FFu, img.pixel(639, 479));
595 EXPECT_EQ(0x0000FEFF, img.pixel(0, 479));595 EXPECT_EQ(0x0000FEFFu, img.pixel(0, 479));
596}596}
597597
598TEST_F(AdminTest, empty_input_path)598TEST_F(AdminTest, empty_input_path)
599599
=== modified file 'tests/thumbnailer/thumbnailer_test.cpp'
--- tests/thumbnailer/thumbnailer_test.cpp 2016-11-11 06:43:10 +0000
+++ tests/thumbnailer/thumbnailer_test.cpp 2017-01-17 04:15:24 +0000
@@ -34,7 +34,7 @@
34#pragma GCC diagnostic ignored "-Wcast-qual"34#pragma GCC diagnostic ignored "-Wcast-qual"
35#include <gio/gio.h>35#include <gio/gio.h>
36#pragma GCC diagnostic pop36#pragma GCC diagnostic pop
37#include <gtest/gtest.h>37#include <gtest_nowarn.h>
38#include <QCoreApplication>38#include <QCoreApplication>
39#include <QSignalSpy>39#include <QSignalSpy>
40#include <QTemporaryDir>40#include <QTemporaryDir>
4141
=== modified file 'tests/version/version_test.cpp'
--- tests/version/version_test.cpp 2016-02-25 06:05:42 +0000
+++ tests/version/version_test.cpp 2017-01-17 04:15:24 +0000
@@ -19,7 +19,7 @@
19#include <internal/version.h>19#include <internal/version.h>
2020
21#include <testsetup.h>21#include <testsetup.h>
22#include <gtest/gtest.h>22#include <gtest_nowarn.h>
2323
24using namespace std;24using namespace std;
25using namespace unity::thumbnailer::internal;25using namespace unity::thumbnailer::internal;
2626
=== modified file 'tests/vs-thumb/vs-thumb_test.cpp'
--- tests/vs-thumb/vs-thumb_test.cpp 2016-03-21 02:08:39 +0000
+++ tests/vs-thumb/vs-thumb_test.cpp 2017-01-17 04:15:24 +0000
@@ -40,7 +40,7 @@
40#pragma clang diagnostic pop40#pragma clang diagnostic pop
41#endif41#endif
42#pragma GCC diagnostic pop42#pragma GCC diagnostic pop
43#include <gtest/gtest.h>43#include <gtest_nowarn.h>
44#include <QUrl>44#include <QUrl>
4545
46#include <cstdio>46#include <cstdio>

Subscribers

People subscribed via source and target branches

to all changes: