Project

General

Profile

Task #1476

Check ASSERT_PRED1 behavior in test_crypto.schemes

Added by Stefan Petscharnig 9 days ago. Updated 8 days ago.

Status:
New
Priority:
Low
Target version:
-
Start date:
09.08.2018
Due date:
% Done:

0%

Estimated time:

Description

currently we use ASSERT_TRUE(valid_scheme(scheme));
we wanted to use ASSERT_PRED1(valid_scheme, scheme);

but that resulted in errors such as

/usr/local/include/gtest/gtest-message.h:131:10: error: no match for ‘operator<<’ (operand types are ‘std::__cxx11::basic_stringstream<char>’ and ‘const qkd::crypto::scheme’)

/usr/local/include/gtest/gtest-message.h:131:10: error: cannot bind ‘std::basic_ostream<char>’ lvalue to ‘std::basic_ostream<char>&&’

and a plethora of notes...

same bahavior with &&
ASSERT_PRED1(valid_scheme, create_scheme("evhash-96::")));
ASSERT_TRUE(valid_scheme(create_scheme("evhash-96")));

fail.log (190 KB) fail.log Stefan Petscharnig, 09.08.2018 14:11

History

#1 Updated by Oliver Maurhart 8 days ago

Ok, seems like we are missing some

std::string const & operator<<(std::string & lhs, schema const & rhs) {
    ...
}

to let the compiler pick to proper method on ASSERT_PRED1.

Also available in: Atom PDF