Closed
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 *)NULL
at the top of the test file. But it would be nice to eventually have this fixed.