aboutsummaryrefslogtreecommitdiff
path: root/test.cxx
diff options
context:
space:
mode:
authorPavel Belikov <pavel.fuchs.belikov@gmail.com>2017-11-06 22:34:17 +0300
committerPavel Belikov <pavel.fuchs.belikov@gmail.com>2017-11-06 22:34:17 +0300
commitb55cd27c082d8c6fcbaf98e7b2fbd17140e71801 (patch)
tree9090ce66117e26c99f5b248393533dc5170995dd /test.cxx
parentMerge pull request #38 from pavel-belikov/subparsers-help (diff)
downloadargs.hxx-b55cd27c082d8c6fcbaf98e7b2fbd17140e71801.tar.xz
add travis ci, appveyor, coveralls
Diffstat (limited to 'test.cxx')
-rw-r--r--test.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/test.cxx b/test.cxx
index 0726619..135d1ee 100644
--- a/test.cxx
+++ b/test.cxx
@@ -294,7 +294,7 @@ TEST_CASE("Argument groups should nest", "[args]")
struct DoublesReader
{
- void operator()(const std::string &name, const std::string &value, std::tuple<double, double> &destination)
+ void operator()(const std::string &, const std::string &value, std::tuple<double, double> &destination)
{
size_t commapos = 0;
std::get<0>(destination) = std::stod(value, &commapos);
@@ -421,10 +421,10 @@ enum class MappingEnum
struct ToLowerReader
{
- void operator()(const std::string &name, const std::string &value, std::string &destination)
+ void operator()(const std::string &, const std::string &value, std::string &destination)
{
destination = value;
- std::transform(destination.begin(), destination.end(), destination.begin(), ::tolower);
+ std::transform(destination.begin(), destination.end(), destination.begin(), [](char c) -> char { return static_cast<char>(tolower(c)); });
}
};
@@ -657,9 +657,9 @@ TEST_CASE("Nargs work as expected", "[args]")
REQUIRE(args::get(f) == false);
std::vector<int> vec;
- for (int c : b)
+ for (int be : b)
{
- vec.push_back(c);
+ vec.push_back(be);
}
REQUIRE((vec == std::vector<int>{1, 2, 3}));