From 2143c7140b2a59ec4067ec961651f4532dfa24f5 Mon Sep 17 00:00:00 2001 From: Pranav Srinivas Kumar Date: Mon, 1 Apr 2019 21:44:15 -0400 Subject: [PATCH] Minor update to positional argument test --- tests/test_positional_arguments.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_positional_arguments.hpp b/tests/test_positional_arguments.hpp index b2b55dc..e69d55f 100644 --- a/tests/test_positional_arguments.hpp +++ b/tests/test_positional_arguments.hpp @@ -62,8 +62,8 @@ TEST_CASE("Square a number", "[positional_arguments]") { program.add_argument("square") .help("display a square of a given number") - .action([](const std::string& value) { auto integer = std::stoi(value); return integer * integer; }); + .action([](const std::string& value) { return pow(std::stoi(value), 2); }); program.parse_args({"./main", "15"}); - REQUIRE(program.get("square") == 225); + REQUIRE(program.get("square") == 225); } \ No newline at end of file