Changeset 9d8307a in mainline for uspace/lib/c/test/stdlib.c


Ignore:
Timestamp:
2018-07-19T11:55:19Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0d83cf6f
Parents:
42f5860
git-author:
Jiri Svoboda <jiri@…> (2018-07-18 17:54:45)
git-committer:
Jiri Svoboda <jiri@…> (2018-07-19 11:55:19)
Message:

Reimplement strtold function in libc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/test/stdlib.c

    r42f5860 r9d8307a  
    9090}
    9191
     92/** strtold function */
     93#include <stdio.h>
     94PCUT_TEST(strtold)
     95{
     96        long double ld;
     97        const char *str = " \t4.2e1@";
     98        char *endptr;
     99
     100        ld = strtold(str, &endptr);
     101        printf("ld=%.10lf\n", (double)ld);
     102        PCUT_ASSERT_TRUE(ld == 42.0);
     103}
     104
    92105/** strtol function */
    93106PCUT_TEST(strtol)
Note: See TracChangeset for help on using the changeset viewer.