<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
img {
max-width: 100%;
height: auto;
}
p.details {
font-style:italic;
color:#777
}
.footer p {
font-size:small;
color:#777
}
pre.commit-message {
white-space: pre-wrap;
}
.file-stats a {
text-decoration: none;
}
.file-stats .new-file {
color: #090;
}
.file-stats .deleted-file {
color: #B00;
}
</style>
<body>
<div class='content'>
<h3>Amar Takhar pushed to branch master at <a href="https://gitlab.com/NTPsec/ntpsec">NTPsec / ntpsec</a></h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/3d2ee8b4e07e83d8480570cb3186b49100a239ca">3d2ee8b4</a></strong>
<div>
<span>by Amar Takhar</span>
<i>at 2015-11-23T22:50:39Z</i>
</div>
<pre class='commit-message'>Convert strtolfp.c</pre>
</li>
</ul>
<h4>3 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
tests/common/tests_main.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
tests/libntp/strtolfp.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
tests/wscript
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/3d2ee8b4e07e83d8480570cb3186b49100a239ca#diff-0'>
<strong>
tests/common/tests_main.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/tests/common/tests_main.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/tests/common/tests_main.c
</span><span style="color: #aaaaaa">@@ -60,7 +60,7 @@ static void RunAllTests(void)
</span> // RUN_TEST_GROUP(socktoa);
// RUN_TEST_GROUP(ssl_init);
// RUN_TEST_GROUP(statestr);
<span style="color: #000000;background-color: #ffdddd">-// RUN_TEST_GROUP(strtolfp);
</span><span style="color: #000000;background-color: #ddffdd">+ RUN_TEST_GROUP(strtolfp);
</span> // RUN_TEST_GROUP(timespec);
// RUN_TEST_GROUP(timevalops);
RUN_TEST_GROUP(tstotv);
</code></pre>
<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/3d2ee8b4e07e83d8480570cb3186b49100a239ca#diff-1'>
<strong>
tests/libntp/strtolfp.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/tests/libntp/strtolfp.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/tests/libntp/strtolfp.c
</span><span style="color: #aaaaaa">@@ -1,7 +1,5 @@
</span><span style="color: #000000;background-color: #ffdddd">-extern "C" {
</span> #include "unity.h"
#include "unity_fixture.h"
<span style="color: #000000;background-color: #ffdddd">-}
</span>
TEST_GROUP(strtolfp);
<span style="color: #aaaaaa">@@ -13,21 +11,19 @@ TEST_TEAR_DOWN(strtolfp) {}
</span>
/* This class tests both atolfp and mstolfp */
<span style="color: #000000;background-color: #ffdddd">-class strtolfpTest : public lfptest {
-};
</span>
TEST(strtolfp, PositiveInteger) {
const char *str = "500";
const char *str_ms = "500000";
<span style="color: #000000;background-color: #ffdddd">- l_fp expected = {500,0};
</span><span style="color: #000000;background-color: #ddffdd">+ l_fp expected = {{500},0};
</span> l_fp actual, actual_ms;
TEST_ASSERT_TRUE(atolfp(str, &actual));
TEST_ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
<span style="color: #000000;background-color: #ffdddd">- TEST_ASSERT_TRUE(IsEqual(expected, actual));
- TEST_ASSERT_TRUE(IsEqual(expected, actual_ms));
</span><span style="color: #000000;background-color: #ddffdd">+ TEST_ASSERT_TRUE(IsEqual(&expected, &actual));
+ TEST_ASSERT_TRUE(IsEqual(&expected, &actual_ms));
</span> }
TEST(strtolfp, NegativeInteger) {
<span style="color: #aaaaaa">@@ -43,22 +39,22 @@ TEST(strtolfp, NegativeInteger) {
</span> TEST_ASSERT_TRUE(atolfp(str, &actual));
TEST_ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
<span style="color: #000000;background-color: #ffdddd">- TEST_ASSERT_TRUE(IsEqual(expected, actual));
- TEST_ASSERT_TRUE(IsEqual(expected, actual_ms));
</span><span style="color: #000000;background-color: #ddffdd">+ TEST_ASSERT_TRUE(IsEqual(&expected, &actual));
+ TEST_ASSERT_TRUE(IsEqual(&expected, &actual_ms));
</span> }
TEST(strtolfp, PositiveFraction) {
const char *str = "+500.5";
const char *str_ms = "500500.0";
<span style="color: #000000;background-color: #ffdddd">- l_fp expected = {500, HALF};
</span><span style="color: #000000;background-color: #ddffdd">+ l_fp expected = {{500}, HALF};
</span> l_fp actual, actual_ms;
TEST_ASSERT_TRUE(atolfp(str, &actual));
TEST_ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
<span style="color: #000000;background-color: #ffdddd">- TEST_ASSERT_TRUE(IsEqual(expected, actual));
- TEST_ASSERT_TRUE(IsEqual(expected, actual_ms));
</span><span style="color: #000000;background-color: #ddffdd">+ TEST_ASSERT_TRUE(IsEqual(&expected, &actual));
+ TEST_ASSERT_TRUE(IsEqual(&expected, &actual_ms));
</span> }
TEST(strtolfp, NegativeFraction) {
<span style="color: #aaaaaa">@@ -74,22 +70,22 @@ TEST(strtolfp, NegativeFraction) {
</span> TEST_ASSERT_TRUE(atolfp(str, &actual));
TEST_ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
<span style="color: #000000;background-color: #ffdddd">- TEST_ASSERT_TRUE(IsEqual(expected, actual));
- TEST_ASSERT_TRUE(IsEqual(expected, actual_ms));
</span><span style="color: #000000;background-color: #ddffdd">+ TEST_ASSERT_TRUE(IsEqual(&expected, &actual));
+ TEST_ASSERT_TRUE(IsEqual(&expected, &actual_ms));
</span> }
TEST(strtolfp, PositiveMsFraction) {
const char *str = "300.00025";
const char *str_ms = "300000.25";
<span style="color: #000000;background-color: #ffdddd">- l_fp expected = {300, QUARTER_PROMILLE_APPRX};
</span><span style="color: #000000;background-color: #ddffdd">+ l_fp expected = {{300}, QUARTER_PROMILLE_APPRX};
</span> l_fp actual, actual_ms;
TEST_ASSERT_TRUE(atolfp(str, &actual));
TEST_ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
<span style="color: #000000;background-color: #ffdddd">- TEST_ASSERT_TRUE(IsEqual(expected, actual));
- TEST_ASSERT_TRUE(IsEqual(expected, actual_ms));
</span><span style="color: #000000;background-color: #ddffdd">+ TEST_ASSERT_TRUE(IsEqual(&expected, &actual));
+ TEST_ASSERT_TRUE(IsEqual(&expected, &actual_ms));
</span> }
TEST(strtolfp, NegativeMsFraction) {
<span style="color: #aaaaaa">@@ -105,8 +101,8 @@ TEST(strtolfp, NegativeMsFraction) {
</span> TEST_ASSERT_TRUE(atolfp(str, &actual));
TEST_ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
<span style="color: #000000;background-color: #ffdddd">- TEST_ASSERT_TRUE(IsEqual(expected, actual));
- TEST_ASSERT_TRUE(IsEqual(expected, actual_ms));
</span><span style="color: #000000;background-color: #ddffdd">+ TEST_ASSERT_TRUE(IsEqual(&expected, &actual));
+ TEST_ASSERT_TRUE(IsEqual(&expected, &actual_ms));
</span> }
TEST(strtolfp, InvalidChars) {
</code></pre>
<br>
</li>
<li id='diff-2'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/3d2ee8b4e07e83d8480570cb3186b49100a239ca#diff-2'>
<strong>
tests/wscript
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/tests/wscript
</span><span style="color: #000000;background-color: #ddffdd">+++ b/tests/wscript
</span><span style="color: #aaaaaa">@@ -75,7 +75,7 @@ def build(ctx):
</span> # "libntp/socktoa.c",
# "libntp/ssl_init.c",
# "libntp/statestr.c",
<span style="color: #000000;background-color: #ffdddd">-# "libntp/strtolfp.c",
</span><span style="color: #000000;background-color: #ddffdd">+ "libntp/strtolfp.c",
</span> # "libntp/timespecops.c",
# "libntp/timevalops.c",
"libntp/tstotv.c",
</code></pre>
<br>
</li>
</div>
<div class='footer' style='margin-top: 10px;'>
<p>
—
<br>
<a href="https://gitlab.com/NTPsec/ntpsec/commit/3d2ee8b4e07e83d8480570cb3186b49100a239ca">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.com/NTPsec/ntpsec/commit/3d2ee8b4e07e83d8480570cb3186b49100a239ca"}}</script>
</p>
</div>
</body>
</html>