Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
130
Issues
130
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-daemon
Commits
2ee17c35
Commit
2ee17c35
authored
May 31, 2019
by
Mohamed Fenjiro
Committed by
Sébastien Blin
May 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unitTest: fix string_utils
Change-Id: I57d3efa477490196e6e935d00a6e98f15d970714
parent
d623c210
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
test/unitTest/string_utils/testString_utils.cpp
test/unitTest/string_utils/testString_utils.cpp
+5
-5
No files found.
test/unitTest/string_utils/testString_utils.cpp
View file @
2ee17c35
...
...
@@ -45,9 +45,9 @@ private:
CPPUNIT_TEST
(
split_string_test
);
CPPUNIT_TEST_SUITE_END
();
const
double
DOUBLE
=
3.14159
265359
;
const
double
DOUBLE
=
3.14159
3
;
const
int
INT
=
42
;
const
std
::
string
PI_DOUBLE
=
"3.14159
265359
"
;
const
std
::
string
PI_DOUBLE
=
"3.14159
3
"
;
const
std
::
string
PI_FLOAT
=
"3.14159265359"
;
const
std
::
string
PI_42
=
"42"
;
};
...
...
@@ -65,16 +65,16 @@ void
StringUtilsTest
::
to_string_test
()
{
// test with double
CPPUNIT_ASSERT
(
to_string
(
DOUBLE
)
==
PI_DOUBLE
);
CPPUNIT_ASSERT
(
std
::
to_string
(
DOUBLE
)
==
PI_DOUBLE
);
// test with float
float
varFloat
=
3.14
;
std
::
string
sVarFloat
=
to_string
(
varFloat
);
std
::
string
sVarFloat
=
std
::
to_string
(
varFloat
);
CPPUNIT_ASSERT
(
sVarFloat
.
at
(
0
)
==
'3'
&&
sVarFloat
.
at
(
1
)
==
'.'
&&
sVarFloat
.
at
(
2
)
==
'1'
&&
sVarFloat
.
at
(
3
)
==
'4'
);
// test with int
CPPUNIT_ASSERT
(
to_string
(
INT
).
compare
(
PI_42
)
==
0
);
CPPUNIT_ASSERT
(
std
::
to_string
(
INT
).
compare
(
PI_42
)
==
0
);
}
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment