Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
c838727f
Unverified
Commit
c838727f
authored
4 years ago
by
Sébastien Blin
Browse files
Options
Downloads
Patches
Plain Diff
tests: fix build for testString_utils.cpp
Change-Id: I58229b352a9d1ed1507696ccdf5341e697ffbfb9
parent
c420c5b4
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/unitTest/string_utils/testString_utils.cpp
+12
-9
12 additions, 9 deletions
test/unitTest/string_utils/testString_utils.cpp
with
12 additions
and
9 deletions
test/unitTest/string_utils/testString_utils.cpp
+
12
−
9
View file @
c838727f
...
@@ -29,9 +29,11 @@
...
@@ -29,9 +29,11 @@
using
namespace
std
::
literals
;
using
namespace
std
::
literals
;
namespace
jami
{
namespace
test
{
namespace
jami
{
namespace
test
{
class
StringUtilsTest
:
public
CppUnit
::
TestFixture
{
class
StringUtilsTest
:
public
CppUnit
::
TestFixture
{
public:
public:
static
std
::
string
name
()
{
return
"string_utils"
;
}
static
std
::
string
name
()
{
return
"string_utils"
;
}
...
@@ -73,8 +75,8 @@ StringUtilsTest::to_string_test()
...
@@ -73,8 +75,8 @@ StringUtilsTest::to_string_test()
// test with float
// test with float
float
varFloat
=
3.14
;
float
varFloat
=
3.14
;
std
::
string
sVarFloat
=
to_string
(
varFloat
);
std
::
string
sVarFloat
=
to_string
(
varFloat
);
CPPUNIT_ASSERT
(
sVarFloat
.
at
(
0
)
==
'3'
&&
sVarFloat
.
at
(
1
)
==
'.'
CPPUNIT_ASSERT
(
sVarFloat
.
at
(
0
)
==
'3'
&&
sVarFloat
.
at
(
1
)
==
'.'
&&
sVarFloat
.
at
(
2
)
==
'1'
&&
sVarFloat
.
at
(
2
)
==
'1'
&&
sVarFloat
.
at
(
3
)
==
'4'
);
&&
sVarFloat
.
at
(
3
)
==
'4'
);
// test with int
// test with int
CPPUNIT_ASSERT
(
std
::
to_string
(
INT
).
compare
(
PI_42
)
==
0
);
CPPUNIT_ASSERT
(
std
::
to_string
(
INT
).
compare
(
PI_42
)
==
0
);
...
@@ -93,7 +95,7 @@ StringUtilsTest::to_number_test()
...
@@ -93,7 +95,7 @@ StringUtilsTest::to_number_test()
void
void
StringUtilsTest
::
split_string_test
()
StringUtilsTest
::
split_string_test
()
{
{
constexpr
auto
data
=
"*fdg454()**{&xcx*"
sv
;
auto
data
=
"*fdg454()**{&xcx*"
sv
;
auto
split_string_result
=
split_string
(
data
,
'*'
);
auto
split_string_result
=
split_string
(
data
,
'*'
);
CPPUNIT_ASSERT
(
split_string_result
.
size
()
==
2
);
CPPUNIT_ASSERT
(
split_string_result
.
size
()
==
2
);
CPPUNIT_ASSERT
(
split_string_result
.
at
(
0
)
==
"fdg454()"
sv
CPPUNIT_ASSERT
(
split_string_result
.
at
(
0
)
==
"fdg454()"
sv
...
@@ -114,6 +116,7 @@ StringUtilsTest::split_string_test()
...
@@ -114,6 +116,7 @@ StringUtilsTest::split_string_test()
&&
split_string_result
.
at
(
1
)
==
"{&xcx"
sv
);
&&
split_string_result
.
at
(
1
)
==
"{&xcx"
sv
);
}
}
}}
// namespace jami_test
}
// namespace test
}
// namespace jami
RING_TEST_RUNNER
(
jami
::
test
::
StringUtilsTest
::
name
());
RING_TEST_RUNNER
(
jami
::
test
::
StringUtilsTest
::
name
());
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment