Build fails on src/tests/rect-test.cpp

Bug #1651550 reported by Caryo Scelus on 2016-12-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lib2geom
Undecided
Unassigned

Bug Description

While building lib2geom for the first time, i run into this problem:

```
src/tests/rect-test.cpp:357:1: required from here
../src/gtest/gtest.h:8071:18: error: no matching function for call to ‘testing::AssertionResult::AssertionResult(Geom::GenericRectTest<double>::OptCRect&)’
       ::testing::AssertionResult(expression)) \
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/gtest/gtest.h:19328:3: note: in expansion of macro ‘GTEST_TEST_BOOLEAN_
   GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
   ^~~~~~~~~~~~~~~~~~~
src/tests/rect-test.cpp:254:5: note: in expansion of macro ‘EXPECT_TRUE’
     EXPECT_TRUE(oa);
In file included from src/tests/rect-test.cpp:34:0:
../src/gtest/gtest.h:17675:12: note: candidate: testing::AssertionResult::AssertionResult(bool)
   explicit AssertionResult(bool success) : success_(success) {}
            ^~~~~~~~~~~~~~~
../src/gtest/gtest.h:17675:12: note: no known conversion for argument 1 from ‘Geom::GenericRectTest<double>::OptCRect {aka Geom::OptRect}’ to ‘bool’
../src/gtest/gtest.h:17673:3: note: candidate: testing::AssertionResult::AssertionResult(const testing::AssertionResult&)
   AssertionResult(const AssertionResult& other);
   ^~~~~~~~~~~~~~~
../src/gtest/gtest.h:17673:3: note: no known conversion for argument 1 from ‘Geom::GenericRectTest<double>::OptCRect {aka Geom::OptRect}’ to ‘const testing::AssertionResult&’
```

I fixed this with replacing offending line with "EXPECT_TRUE(!!oa);" and it seems to work, but i'm not sure it's wanted solution or proper bool conversion should be introduced.

Revision history for this message
Patrick Storz (ede123) wrote :

Does not reproduce anymore.

If you're still able to reproduce this issue, please file a new bug at https://gitlab.com/inkscape/lib2geom/

Changed in lib2geom:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers