Merge unity:fix-std-tuple-use into unity:master

Proposed by Dmitry Shachnev
Status: Merged
Approved by: Dmitry Shachnev
Approved revision: 8e42a5a5ce8091a5976ca0aa0caad91b05080704
Merged at revision: 31c1c1ddabff64e8ffc386c2e0380ac7c8f4fc62
Proposed branch: unity:fix-std-tuple-use
Merge into: unity:master
Diff against target: 57 lines (+12/-12)
2 files modified
tests/test_launcher_hide_machine.cpp (+3/-3)
tests/test_launcher_hover_machine.cpp (+9/-9)
Reviewer Review Type Date Requested Status
Alberts Muktupāvels (community) Approve
Marco Trevisan (Treviño) Pending
Unity Team Pending
Review via email: mp+359970@code.launchpad.net

Commit message

Use std::get instead of std::tr1::get for std::tuple.

Description of the change

Use std::get instead of std::tr1::get for std::tuple.

std::tr1::get produces the following error:

tests/test_launcher_hide_machine.cpp:55:43: error: no matching function for call to ‘get<0>(const ParamType&)’
tests/test_launcher_hide_machine.cpp:55:43: note: ‘const ParamType’ {aka ‘const std::tuple<unity::launcher::LauncherHideMachine::HideQuirk, bool, bool>’} is not derived from ‘const std::tr1::tuple<_Elements ...>’

To post a comment you must log in.
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Hi Marco!

With this fix, rebuilt compiz, and a patch in glewmx I am able to build Unity in https://launchpad.net/~ci-train-ppa-service/+archive/3336/+packages on all architectures except armhf.

Do you know what can cause the armhf failure? Can we disable tests on armhf temporarily to get the other fixes in?

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

This fixes the errors from include-fixes branch but armhf still fails. We should probably also check if it is still compiling against newer boost from proposed.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

The change looks good, the problem with armhf looks more a crash inside launchpad.

I tried to debug that in a remote VM but I wasn't able to get much more infos... I see if I can find anything related.

Or we can probably try to publish without armhf.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

The current state is that it fails to build on *all* architectures again:

https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3336/+build/15741781

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

The build I linked above is no longer actual, here is a fresh build with test failures:

https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3336/+build/16198941

Revision history for this message
Alberts Muktupāvels (muktupavels) :
review: Approve
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

With https://code.launchpad.net/~unity-team/unity/+git/unity/+merge/361372 the tests passed on all architectures, so I am approving and landing this.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tests/test_launcher_hide_machine.cpp b/tests/test_launcher_hide_machine.cpp
2index 41adc7b..47a7c66 100644
3--- a/tests/test_launcher_hide_machine.cpp
4+++ b/tests/test_launcher_hide_machine.cpp
5@@ -52,9 +52,9 @@ struct HideModeNever : public TestWithParam<std::tuple<ul::LauncherHideMachine::
6 #pragma GCC diagnostic ignored "-Wunused-variable"
7
8 TEST_P(HideModeNever, Bool2Bool) {
9- auto quirk = std::tr1::get<0>(GetParam());
10- bool initial_value = std::tr1::get<1>(GetParam());
11- bool final_value = std::tr1::get<2>(GetParam());
12+ auto quirk = std::get<0>(GetParam());
13+ bool initial_value = std::get<1>(GetParam());
14+ bool final_value = std::get<2>(GetParam());
15
16 machine.SetMode(ul::LauncherHideMachine::HIDE_NEVER);
17 machine.SetQuirk(quirk, initial_value);
18diff --git a/tests/test_launcher_hover_machine.cpp b/tests/test_launcher_hover_machine.cpp
19index fb3939e..9484300 100644
20--- a/tests/test_launcher_hover_machine.cpp
21+++ b/tests/test_launcher_hover_machine.cpp
22@@ -40,9 +40,9 @@ struct SingleQuirk : public TestWithParam<std::tuple<unity::LauncherHoverMachine
23 };
24
25 TEST_P(SingleQuirk, Bool2Bool) {
26- auto quirk = std::tr1::get<0>(GetParam());
27- bool initial_value = std::tr1::get<1>(GetParam());
28- bool final_value = std::tr1::get<2>(GetParam());
29+ auto quirk = std::get<0>(GetParam());
30+ bool initial_value = std::get<1>(GetParam());
31+ bool final_value = std::get<2>(GetParam());
32
33 machine.SetQuirk(quirk, initial_value);
34 Utils::WaitForTimeoutMSec(20); // ignore the first signal
35@@ -79,16 +79,16 @@ struct MultipleQuirks : public TestWithParam<std::tuple<unity::LauncherHoverMach
36 };
37
38 TEST_P(MultipleQuirks, DoubleBool2Bool) {
39- auto quirk1 = std::tr1::get<0>(GetParam());
40- auto quirk2 = std::tr1::get<3>(GetParam());
41+ auto quirk1 = std::get<0>(GetParam());
42+ auto quirk2 = std::get<3>(GetParam());
43
44 if (quirk1 == quirk2)
45 return;
46
47- bool initial_value1 = std::tr1::get<1>(GetParam());
48- bool final_value1 = std::tr1::get<2>(GetParam());
49- bool initial_value2 = std::tr1::get<4>(GetParam());
50- bool final_value2 = std::tr1::get<5>(GetParam());
51+ bool initial_value1 = std::get<1>(GetParam());
52+ bool final_value1 = std::get<2>(GetParam());
53+ bool initial_value2 = std::get<4>(GetParam());
54+ bool final_value2 = std::get<5>(GetParam());
55
56 machine.SetQuirk(quirk1, initial_value1);
57 machine.SetQuirk(quirk2, initial_value2);

Subscribers

People subscribed via source and target branches

to all changes: