Changeset 9c40b834 in mainline


Ignore:
Timestamp:
2024-09-12T12:35:23Z (2 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
2ee6351
Parents:
de4f165
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-08-20 13:57:22)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-09-12 12:35:23)
Message:

Add test for ticket #631

Location:
uspace
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tester/print/print2.c

    rde4f165 r9c40b834  
    6262        TPRINTF("Real output:     [%td] [%tu] [%tx] [%ti] [%to]\n\n", d, neg_d, neg_d, d, neg_d);
    6363
     64        TPRINTF("Testing printf(\"%%lf\", 768.0):\n");
     65        TPRINTF("Expected output: [768.000000]\n");
     66        TPRINTF("Real output:     [%lf]\n", 768.0);
     67
    6468        return NULL;
    6569}
  • uspace/lib/c/test/double_to_str.c

    rde4f165 r9c40b834  
    176176        PCUT_ASSERT_INT_EQUALS(-3, dec);
    177177        PCUT_ASSERT_STR_EQUALS("1100", buf);
     178
     179        d = extract_ieee_double(768.0);
     180        ret = double_to_fixed_str(d, -1, 3, buf, size, &dec);
     181        PCUT_ASSERT_INT_EQUALS(4, ret);
     182        PCUT_ASSERT_INT_EQUALS(-3, dec);
     183        PCUT_ASSERT_STR_EQUALS("768", buf);
    178184}
    179185
Note: See TracChangeset for help on using the changeset viewer.