printfloat_test.c (291840) | printfloat_test.c (292152) |
---|---|
1/*- 2 * Copyright (c) 2002-2009 David Schultz <das@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * SUCH DAMAGE. 25 */ 26 27/* 28 * Test for printf() floating point formats. 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002-2009 David Schultz <das@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * SUCH DAMAGE. 25 */ 26 27/* 28 * Test for printf() floating point formats. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: stable/10/lib/libc/tests/stdio/printfloat_test.c 291840 2015-12-05 04:17:40Z ngie $"); | 32__FBSDID("$FreeBSD: stable/10/lib/libc/tests/stdio/printfloat_test.c 292152 2015-12-13 04:29:09Z ngie $"); |
33 34#include <err.h> 35#include <fenv.h> 36#include <float.h> 37#include <locale.h> 38#include <math.h> 39#include <stdio.h> 40#include <stdarg.h> --- 40 unchanged lines hidden (view full) --- 81 mbstowcs(wfmt, fmt, BUF - 1); 82 mbstowcs(wresult, result, BUF - 1); 83 vswprintf(ws, sizeof(ws) / sizeof(ws[0]), wfmt, ap2); 84 if (wcscmp(wresult, ws) != 0) { 85 atf_tc_fail( 86 "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]\n", 87 wfmt, argstr, ws, wresult); 88 } | 33 34#include <err.h> 35#include <fenv.h> 36#include <float.h> 37#include <locale.h> 38#include <math.h> 39#include <stdio.h> 40#include <stdarg.h> --- 40 unchanged lines hidden (view full) --- 81 mbstowcs(wfmt, fmt, BUF - 1); 82 mbstowcs(wresult, result, BUF - 1); 83 vswprintf(ws, sizeof(ws) / sizeof(ws[0]), wfmt, ap2); 84 if (wcscmp(wresult, ws) != 0) { 85 atf_tc_fail( 86 "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]\n", 87 wfmt, argstr, ws, wresult); 88 } |
89 va_end(ap); 90 va_end(ap2); |
|
89} 90 91ATF_TC_WITHOUT_HEAD(float_within_limits); 92ATF_TC_BODY(float_within_limits, tc) 93{ 94 95 ATF_REQUIRE(setlocale(LC_NUMERIC, "C")); 96 --- 294 unchanged lines hidden --- | 91} 92 93ATF_TC_WITHOUT_HEAD(float_within_limits); 94ATF_TC_BODY(float_within_limits, tc) 95{ 96 97 ATF_REQUIRE(setlocale(LC_NUMERIC, "C")); 98 --- 294 unchanged lines hidden --- |