Skip to content
Snippets Groups Projects
Unverified Commit c838727f authored by Sébastien Blin's avatar Sébastien Blin
Browse files

tests: fix build for testString_utils.cpp

Change-Id: I58229b352a9d1ed1507696ccdf5341e697ffbfb9
parent c420c5b4
No related branches found
No related tags found
No related merge requests found
......@@ -29,9 +29,11 @@
using namespace std::literals;
namespace jami { namespace test {
namespace jami {
namespace test {
class StringUtilsTest : public CppUnit::TestFixture {
class StringUtilsTest : public CppUnit::TestFixture
{
public:
static std::string name() { return "string_utils"; }
......@@ -73,8 +75,8 @@ StringUtilsTest::to_string_test()
// test with float
float varFloat = 3.14;
std::string sVarFloat = to_string(varFloat);
CPPUNIT_ASSERT(sVarFloat.at(0) == '3' && sVarFloat.at(1) == '.'
&& sVarFloat.at(2) == '1' && sVarFloat.at(3) == '4');
CPPUNIT_ASSERT(sVarFloat.at(0) == '3' && sVarFloat.at(1) == '.' && sVarFloat.at(2) == '1'
&& sVarFloat.at(3) == '4');
// test with int
CPPUNIT_ASSERT(std::to_string(INT).compare(PI_42) == 0);
......@@ -93,7 +95,7 @@ StringUtilsTest::to_number_test()
void
StringUtilsTest::split_string_test()
{
constexpr auto data = "*fdg454()**{&xcx*"sv;
auto data = "*fdg454()**{&xcx*"sv;
auto split_string_result = split_string(data, '*');
CPPUNIT_ASSERT(split_string_result.size() == 2);
CPPUNIT_ASSERT(split_string_result.at(0) == "fdg454()"sv
......@@ -114,6 +116,7 @@ StringUtilsTest::split_string_test()
&& split_string_result.at(1) == "{&xcx"sv);
}
}} // namespace jami_test
} // namespace test
} // namespace jami
RING_TEST_RUNNER(jami::test::StringUtilsTest::name());
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment