<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/4ca43bda6d6c0caf90f14c223832321cf2036b89">4ca43bda</a></strong>
<div>
<span>by Amar Takhar</span>
<i>at 2015-11-23T22:37:58Z</i>
</div>
<pre class='commit-message'>Dodge some unused func tests for now.  This needs a lot of work.

This is a temp measure until all tests are converted.  There needs to be a huge
amount of header changes once it's all done I'll have a clear picture.</pre>
</li>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/1096e3f734b75998cd946edbd803227cb7888110">1096e3f7</a></strong>
<div>
<span>by Amar Takhar</span>
<i>at 2015-11-23T22:38:55Z</i>
</div>
<pre class='commit-message'>Convert tvtots.c</pre>
</li>
</ul>
<h4>9 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'>
<span class='new-file'>
+
tests/libntp/cal.h
</span>
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
tests/libntp/caljulian.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
tests/libntp/calyearstart.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-4'>
tests/libntp/clocktime.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-5'>
tests/libntp/lfptest.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-6'>
tests/libntp/libntptest.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-7'>
tests/libntp/tvtots.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-8'>
tests/wscript
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/32dd5e6b38dc0d6a1b541d835ab0740579c68462...1096e3f734b75998cd946edbd803227cb7888110#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">@@ -64,7 +64,7 @@ static void RunAllTests(void)
</span> //        RUN_TEST_GROUP(timespec);
 //     RUN_TEST_GROUP(timevalops);
        RUN_TEST_GROUP(tstotv);
<span style="color: #000000;background-color: #ffdddd">-//      RUN_TEST_GROUP(tvtots);
</span><span style="color: #000000;background-color: #ddffdd">+   RUN_TEST_GROUP(tvtots);
</span> //        RUN_TEST_GROUP(vi64);
 //     RUN_TEST_GROUP(ymd2yd);
 #endif
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/32dd5e6b38dc0d6a1b541d835ab0740579c68462...1096e3f734b75998cd946edbd803227cb7888110#diff-1'>
<strong>
tests/libntp/cal.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- /dev/null
</span><span style="color: #000000;background-color: #ddffdd">+++ b/tests/libntp/cal.h
</span><span style="color: #aaaaaa">@@ -0,0 +1,3 @@
</span><span style="color: #000000;background-color: #ddffdd">+static time_t timefunc(time_t*);
+static void   settime(int y, int m, int d, int H, int M, int S);
+
</span></code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/32dd5e6b38dc0d6a1b541d835ab0740579c68462...1096e3f734b75998cd946edbd803227cb7888110#diff-2'>
<strong>
tests/libntp/caljulian.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/tests/libntp/caljulian.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/tests/libntp/caljulian.c
</span><span style="color: #aaaaaa">@@ -15,6 +15,7 @@ extern "C" {
</span> #include "ntp_calendar.h"
 }
 
<span style="color: #000000;background-color: #ddffdd">+#include "cal.h"
</span> #include <string>
 #include <sstream>
 
</code></pre>

<br>
</li>
<li id='diff-3'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/32dd5e6b38dc0d6a1b541d835ab0740579c68462...1096e3f734b75998cd946edbd803227cb7888110#diff-3'>
<strong>
tests/libntp/calyearstart.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/tests/libntp/calyearstart.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/tests/libntp/calyearstart.c
</span><span style="color: #aaaaaa">@@ -10,6 +10,7 @@ TEST_SETUP(calyearstart) {}
</span> TEST_TEAR_DOWN(calyearstart) {}
 
 #include "libntptest.h"
<span style="color: #000000;background-color: #ddffdd">+#include "cal.h"
</span> 
 class calyearstartTest : public libntptest {
 protected:
</code></pre>

<br>
</li>
<li id='diff-4'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/32dd5e6b38dc0d6a1b541d835ab0740579c68462...1096e3f734b75998cd946edbd803227cb7888110#diff-4'>
<strong>
tests/libntp/clocktime.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/tests/libntp/clocktime.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/tests/libntp/clocktime.c
</span><span style="color: #aaaaaa">@@ -10,6 +10,7 @@ TEST_SETUP(clocktime) {}
</span> TEST_TEAR_DOWN(clocktime) {}
 
 #include "libntptest.h"
<span style="color: #000000;background-color: #ddffdd">+#include "cal.h"
</span> 
 // ---------------------------------------------------------------------
 // test fixture
</code></pre>

<br>
</li>
<li id='diff-5'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/32dd5e6b38dc0d6a1b541d835ab0740579c68462...1096e3f734b75998cd946edbd803227cb7888110#diff-5'>
<strong>
tests/libntp/lfptest.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/tests/libntp/lfptest.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/tests/libntp/lfptest.h
</span><span style="color: #aaaaaa">@@ -4,11 +4,11 @@
</span> #include "libntptest.h"
 #include "ntp_fp.h"
 
<span style="color: #000000;background-color: #ffdddd">-static bool IsEqual(const l_fp &expected, const l_fp &actual) {
-       if (L_ISEQU(&expected, &actual)) {
</span><span style="color: #000000;background-color: #ddffdd">+static bool IsEqual(const l_fp *expected, const l_fp *actual) {
+       if (L_ISEQU(expected, actual)) {
</span>           return true;
        } else {
<span style="color: #000000;background-color: #ffdddd">-                printf("Expected: %d (%d.%d) but was: %d (%d.%d)\n", lfptoa(&expected, FRACTION_PREC), expected.l_ui, expected.l_uf, lfptoa(&actual, FRACTION_PREC), actual.l_ui, actual.l_uf);
</span><span style="color: #000000;background-color: #ddffdd">+           printf("Expected: %s (%d.%d) but was: %s (%d.%d)\n", lfptoa(expected, FRACTION_PREC), expected->l_ui, expected->l_uf, lfptoa(actual, FRACTION_PREC), actual->l_ui, actual->l_uf);
</span>           return false;
        }
 }
</code></pre>

<br>
</li>
<li id='diff-6'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/32dd5e6b38dc0d6a1b541d835ab0740579c68462...1096e3f734b75998cd946edbd803227cb7888110#diff-6'>
<strong>
tests/libntp/libntptest.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/tests/libntp/libntptest.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/tests/libntp/libntptest.h
</span><span style="color: #aaaaaa">@@ -3,6 +3,4 @@
</span> #include "ntp_stdlib.h"
 #include "ntp_calendar.h"
 
<span style="color: #000000;background-color: #ffdddd">-static time_t timefunc(time_t*);
</span> static time_t nowtime;
<span style="color: #000000;background-color: #ffdddd">-static void   settime(int y, int m, int d, int H, int M, int S);
</span></code></pre>

<br>
</li>
<li id='diff-7'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/32dd5e6b38dc0d6a1b541d835ab0740579c68462...1096e3f734b75998cd946edbd803227cb7888110#diff-7'>
<strong>
tests/libntp/tvtots.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/tests/libntp/tvtots.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/tests/libntp/tvtots.c
</span><span style="color: #aaaaaa">@@ -1,34 +1,30 @@
</span><span style="color: #000000;background-color: #ffdddd">-extern "C" {
</span><span style="color: #000000;background-color: #ddffdd">+#include "config.h"
+
</span> #include "unity.h"
 #include "unity_fixture.h"
<span style="color: #000000;background-color: #ffdddd">-}
-
-TEST_GROUP(tvtots);
-
-TEST_SETUP(tvtots) {}
-
-TEST_TEAR_DOWN(tvtots) {}
</span> 
 #include "lfptest.h"
<span style="color: #000000;background-color: #ffdddd">-
-extern "C" {
</span> #include "timevalops.h"
<span style="color: #000000;background-color: #ffdddd">-};
</span> 
 // Required on Solaris for ldexp.
 #include <math.h>
 
<span style="color: #000000;background-color: #ffdddd">-class tvtotsTest : public lfptest {
-};
</span><span style="color: #000000;background-color: #ddffdd">+
+TEST_GROUP(tvtots);
+
+TEST_SETUP(tvtots) {}
+
+TEST_TEAR_DOWN(tvtots) {}
+
</span> 
 TEST(tvtots, Seconds) {
<span style="color: #000000;background-color: #ffdddd">-        timeval input = {500, 0}; // 500.0 s
-       l_fp expected = {500, 0};
</span><span style="color: #000000;background-color: #ddffdd">+   struct timeval input = {500, 0}; // 500.0 s
+       l_fp expected = {{500}, 0};
</span>   l_fp actual;
 
        TVTOTS(&input, &actual);
 
<span style="color: #000000;background-color: #ffdddd">-        TEST_ASSERT_TRUE(IsEqual(expected, actual));
</span><span style="color: #000000;background-color: #ddffdd">+   TEST_ASSERT_TRUE(IsEqual(&expected, &actual));
</span> }
 
 TEST(tvtots, MicrosecondsRounded) {
<span style="color: #aaaaaa">@@ -37,18 +33,18 @@ TEST(tvtots, MicrosecondsRounded) {
</span>    * HALF_PROMILLE_UP (which is 2147484) should be
         * the correct rounding. */
 
<span style="color: #000000;background-color: #ffdddd">-        timeval input = {0, 500}; // 0.0005 exact
-       l_fp expected = {0, HALF_PROMILLE_UP};
</span><span style="color: #000000;background-color: #ddffdd">+   struct timeval input = {0, 500}; // 0.0005 exact
+       l_fp expected = {{0}, HALF_PROMILLE_UP};
</span>   l_fp actual;
 
        TVTOTS(&input, &actual);
<span style="color: #000000;background-color: #ffdddd">-        TEST_ASSERT_TRUE(IsEqual(expected, actual));
</span><span style="color: #000000;background-color: #ddffdd">+   TEST_ASSERT_TRUE(IsEqual(&expected, &actual));
</span> }
 
 TEST(tvtots, MicrosecondsExact) {
        // 0.5 can be represented exact in both l_fp and timeval.
<span style="color: #000000;background-color: #ffdddd">-        const timeval input = {10, 500000}; // 0.5 exact
-       const l_fp expected = {10, HALF}; // 0.5 exact
</span><span style="color: #000000;background-color: #ddffdd">+   const struct timeval input = {10, 500000}; // 0.5 exact
+       const l_fp expected = {{10}, HALF}; // 0.5 exact
</span>   l_fp actual;
 
        TVTOTS(&input, &actual);
</code></pre>

<br>
</li>
<li id='diff-8'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/32dd5e6b38dc0d6a1b541d835ab0740579c68462...1096e3f734b75998cd946edbd803227cb7888110#diff-8'>
<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">@@ -79,7 +79,7 @@ def build(ctx):
</span> #         "libntp/timespecops.c",
 #              "libntp/timevalops.c",
                "libntp/tstotv.c",
<span style="color: #000000;background-color: #ffdddd">-#               "libntp/tvtots.c",
</span><span style="color: #000000;background-color: #ddffdd">+           "libntp/tvtots.c",
</span> #         "libntp/vi64ops.c",
 #              "libntp/ymd2yd.c"
        ] + common_source
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://gitlab.com/NTPsec/ntpsec/compare/32dd5e6b38dc0d6a1b541d835ab0740579c68462...1096e3f734b75998cd946edbd803227cb7888110">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":["merge_requests","issues","commit"],"url":"https://gitlab.com/NTPsec/ntpsec/compare/32dd5e6b38dc0d6a1b541d835ab0740579c68462...1096e3f734b75998cd946edbd803227cb7888110"}}</script>
</p>
</div>
</body>
</html>