mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2025-02-20 02:40:34 +00:00
src/test_* : Fix printing of int64_t values.
This commit is contained in:
parent
548daca9b7
commit
0b0c66d5df
@ -3,6 +3,9 @@
|
||||
* src/file_io.c
|
||||
Use intptr_t instead of long for return value of _get_osfhandle.
|
||||
|
||||
* src/test_conversions.c src/test_endswap.tpl
|
||||
Fix printing of int64_t values.
|
||||
|
||||
2008-09-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* examples/*
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "test_main.h"
|
||||
@ -87,7 +88,7 @@ conversion_test (char endian)
|
||||
cmp_test (__LINE__, i16, t16, "\n\nLine %d : 16 bit int failed 0x%x -> 0x%x.\n\n") ;
|
||||
cmp_test (__LINE__, i24, t24, "\n\nLine %d : 24 bit int failed 0x%x -> 0x%x.\n\n") ;
|
||||
cmp_test (__LINE__, i32, t32, "\n\nLine %d : 32 bit int failed 0x%x -> 0x%x.\n\n") ;
|
||||
cmp_test (__LINE__, i64, t64, "\n\nLine %d : 64 bit int failed 0x%llx -> 0x%llx.\n\n") ;
|
||||
cmp_test (__LINE__, i64, t64, "\n\nLine %d : 64 bit int failed 0x%" PRIx64 "x -> 0x%" PRIx64 "x.\n\n") ;
|
||||
|
||||
remove (filename) ;
|
||||
puts ("ok") ;
|
||||
|
@ -21,14 +21,14 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "sfendian.h"
|
||||
|
||||
@ -36,12 +36,7 @@
|
||||
|
||||
#define FMT_SHORT "0x%04x\n"
|
||||
#define FMT_INT "0x%08x\n"
|
||||
|
||||
#if SIZEOF_INT64_T == SIZEOF_LONG
|
||||
#define FMT_INT64 "0x%016lx\n"
|
||||
#else
|
||||
#define FMT_INT64 "0x%016llx\n"
|
||||
#endif
|
||||
#define FMT_INT64 "0x%016" PRIx64 "\n"
|
||||
|
||||
/*==============================================================================
|
||||
** Test functions.
|
||||
|
Loading…
x
Reference in New Issue
Block a user