Fix warnings in test (#92)

* Convert tabs to spaces

* Remove extra semicolons in test

* Fix warnings in test

-Wreturn-type
-Wunused-parameter
-Wunused-value

* Fix -Wunused-variable warning in test

The variable 'failptr' is unused. From looking at the other variables in the
test case, it seems the fix is to first remove 'failptr' and then rename
'efail' to 'failptr'.

* Fix -Wunused-variable warning in test

* Fix -Wmacro-redefined warning in test

STATIC_REQUIRE has a previous definition in catch2/catch.hpp.
This commit is contained in:
Simon Truscott
2022-11-24 13:18:39 +00:00
committed by GitHub
parent cd8c7920b3
commit 2675ce3cd4
4 changed files with 21 additions and 20 deletions
+3 -3
View File
@@ -38,9 +38,9 @@ TEST_CASE("Triviality", "[bases.triviality]") {
{
struct T {
T(const T&){}
T(T&&) {};
T& operator=(const T&) {}
T& operator=(T&&) {};
T(T&&) {}
T& operator=(const T&) { return *this; }
T& operator=(T&&) { return *this; }
~T(){}
};
REQUIRE(!std::is_trivially_copy_constructible<tl::expected<T,int>>::value);