-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Labels
arduino mocksCompilation mocks for the Arduino libraryCompilation mocks for the Arduino librarybugSomething isn't workingSomething isn't working
Description
Trying to test that a function returns a null pointer, e.g.
assertEqual(nullptr, result);does not work
.../ArduinoUnitTests.h:69:56: error: ambiguous overload for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘std::nullptr_t’)
cerr << " " << lhsRelevance << ": " << lhs << endl;I tried to fix it by extracting that line into a template function and then make a template specialisation for nullptr but did not get the compiler to select it, and have put that on ice for now since there is a simple workaround, just adding
#define nullptr (void *)NULLat the top of the test file. But it would be nice to eventually have this fixed.
Metadata
Metadata
Assignees
Labels
arduino mocksCompilation mocks for the Arduino libraryCompilation mocks for the Arduino librarybugSomething isn't workingSomething isn't working