Skip to content

Commit

Permalink
float tests added for lexical cast
Browse files Browse the repository at this point in the history
  • Loading branch information
the-moisrex committed Oct 2, 2023
1 parent b80da68 commit ac2796f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/convert_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ TEST(Convert, LexicalCast) {
EXPECT_EQ("-43", lexical::cast<std::string>("-43"));
EXPECT_EQ("-43", lexical::cast<std::string>(-43));

// todo: test for floating points as well
EXPECT_FLOAT_EQ(-43.3, lexical::cast<float>("-43.3"));
EXPECT_FLOAT_EQ(0.1233, lexical::cast<float>(".1233"));
EXPECT_FLOAT_EQ(0.1233, lexical::cast<double>(".1233"));
}
2 changes: 1 addition & 1 deletion webpp/configs/config_concepts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace webpp {
{ config.get("key", "default_value") };
{ config.get("section", "key", "default_value") };
{ config.get("file.ini", "section", "key", "default_value") };
#ifdef false and CXX23
#ifdef false && CXX23
{ config["section", "key", "default_value"] };
#endif

Expand Down

0 comments on commit ac2796f

Please sign in to comment.