[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: avifile tests
From: Vitaliy Margolen <wine-devel () kievinfo ! com>
Date: 2009-12-30 15:02:04
Message-ID: 4B3B6B6C.6050004 () kievinfo ! com
[Download RAW message or body]
Julius Schwartzenberg wrote:
> +static void init_test_struct(COMMON_AVI_HEADERS *cah)
> +{
> + memcpy(&cah->mah, &defmah, sizeof(defmah));
> + memcpy(&cah->ash0, &defash0, sizeof(defash0));
> + memcpy(&cah->ash1, &defash1, sizeof(defash1));
> + memcpy(&cah->pcmwf, &defpcmwf, sizeof(defpcmwf));
> +}
You don't need to use memcpy to copy structures. Simple assignment is
enough. Eg: cah->mah = defmah;
> +static void create_avi_file(const COMMON_AVI_HEADERS *cah)
> +{
> + HANDLE hFile;
> + DWORD written;
> +
> + hFile = CreateFile("small.avi", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, \
> FILE_ATTRIBUTE_NORMAL, NULL);
For tests you should always specify full path. Here you probably want to get
system's tmp directory.
> +static void test_default_data(void)
> +{
>
> + res = AVIFileOpen(&pFile, "small.avi", OF_SHARE_DENY_WRITE, 0L);
Same thing here.
Vitaliy.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic