[Git][NTPsec/ntpsec][working] Added tests for functions in prettydate.c
Ian Bruene
gitlab at mg.gitlab.com
Sun Jul 1 00:46:40 UTC 2018
Ian Bruene pushed to branch working at NTPsec / ntpsec
Commits:
065e9e48 by Ian Bruene at 2018-07-01T00:46:14Z
Added tests for functions in prettydate.c
- - - - -
1 changed file:
- tests/libntp/prettydate.c
Changes:
=====================================
tests/libntp/prettydate.c
=====================================
--- a/tests/libntp/prettydate.c
+++ b/tests/libntp/prettydate.c
@@ -19,6 +19,14 @@ TEST_TEAR_DOWN(prettydate) {}
static const uint32_t HALF = 2147483648UL;
+TEST(prettydate, Rfc3339Date1) {
+ TEST_ASSERT_EQUAL_STRING("2036-02-07T06:28:16.000Z", rfc3339date(0));
+}
+
+TEST(prettydate, Rfc3339Time1) {
+ TEST_ASSERT_EQUAL_STRING("2036-02-07T06:28:16.000Z", rfc3339date(0));
+}
+
TEST(prettydate, ConstantDate) {
l_fp t = lfpinit((int32_t)3485080800LL, HALF); // 2010-06-09 14:00:00.5
@@ -27,4 +35,6 @@ TEST(prettydate, ConstantDate) {
TEST_GROUP_RUNNER(prettydate) {
RUN_TEST_CASE(prettydate, ConstantDate);
+ RUN_TEST_CASE(prettydate, Rfc3339Date1);
+ RUN_TEST_CASE(prettydate, Rfc3339Time1);
}
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/065e9e4868c9666c0cd952d6133536f69606f3a9
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/065e9e4868c9666c0cd952d6133536f69606f3a9
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20180701/15e36fa1/attachment.html>
More information about the vc
mailing list