msasn1/tests: Add initial tests.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
48aefd2a04
commit
4e2ad334b5
|
@ -20760,6 +20760,7 @@ wine_fn_config_makefile dlls/msado15 enable_msado15
|
||||||
wine_fn_config_makefile dlls/msado15/tests enable_tests
|
wine_fn_config_makefile dlls/msado15/tests enable_tests
|
||||||
wine_fn_config_makefile dlls/msadp32.acm enable_msadp32_acm
|
wine_fn_config_makefile dlls/msadp32.acm enable_msadp32_acm
|
||||||
wine_fn_config_makefile dlls/msasn1 enable_msasn1
|
wine_fn_config_makefile dlls/msasn1 enable_msasn1
|
||||||
|
wine_fn_config_makefile dlls/msasn1/tests enable_tests
|
||||||
wine_fn_config_makefile dlls/mscat32 enable_mscat32
|
wine_fn_config_makefile dlls/mscat32 enable_mscat32
|
||||||
wine_fn_config_makefile dlls/mscms enable_mscms
|
wine_fn_config_makefile dlls/mscms enable_mscms
|
||||||
wine_fn_config_makefile dlls/mscms/tests enable_tests
|
wine_fn_config_makefile dlls/mscms/tests enable_tests
|
||||||
|
|
|
@ -3438,6 +3438,7 @@ WINE_CONFIG_MAKEFILE(dlls/msado15)
|
||||||
WINE_CONFIG_MAKEFILE(dlls/msado15/tests)
|
WINE_CONFIG_MAKEFILE(dlls/msado15/tests)
|
||||||
WINE_CONFIG_MAKEFILE(dlls/msadp32.acm)
|
WINE_CONFIG_MAKEFILE(dlls/msadp32.acm)
|
||||||
WINE_CONFIG_MAKEFILE(dlls/msasn1)
|
WINE_CONFIG_MAKEFILE(dlls/msasn1)
|
||||||
|
WINE_CONFIG_MAKEFILE(dlls/msasn1/tests)
|
||||||
WINE_CONFIG_MAKEFILE(dlls/mscat32)
|
WINE_CONFIG_MAKEFILE(dlls/mscat32)
|
||||||
WINE_CONFIG_MAKEFILE(dlls/mscms)
|
WINE_CONFIG_MAKEFILE(dlls/mscms)
|
||||||
WINE_CONFIG_MAKEFILE(dlls/mscms/tests)
|
WINE_CONFIG_MAKEFILE(dlls/mscms/tests)
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
TESTDLL = msasn1.dll
|
||||||
|
IMPORTS = msasn1
|
||||||
|
|
||||||
|
C_SRCS = \
|
||||||
|
asn1.c
|
|
@ -0,0 +1,58 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2020 Vijay Kiran Kamuju
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "msasn1.h"
|
||||||
|
#include "wine/test.h"
|
||||||
|
|
||||||
|
static void test_CreateModule(void)
|
||||||
|
{
|
||||||
|
const ASN1GenericFun_t encfn[] = { NULL };
|
||||||
|
const ASN1GenericFun_t decfn[] = { NULL };
|
||||||
|
const ASN1FreeFun_t freefn[] = { NULL };
|
||||||
|
const ASN1uint32_t size[] = { 0 };
|
||||||
|
ASN1magic_t name = 0x61736e31;
|
||||||
|
ASN1module_t mod;
|
||||||
|
|
||||||
|
mod = ASN1_CreateModule(0, 0, 0, 0, NULL, NULL, NULL, NULL, 0);
|
||||||
|
ok(!mod, "Expected Failure.\n");
|
||||||
|
|
||||||
|
mod = ASN1_CreateModule(0, 0, 0, 0, encfn, NULL, NULL, NULL, 0);
|
||||||
|
ok(!mod, "Expected Failure.\n");
|
||||||
|
|
||||||
|
mod = ASN1_CreateModule(0, 0, 0, 0, encfn, decfn, NULL, NULL, 0);
|
||||||
|
ok(!mod, "Expected Failure.\n");
|
||||||
|
|
||||||
|
mod = ASN1_CreateModule(0, 0, 0, 0, encfn, decfn, freefn, NULL, 0);
|
||||||
|
ok(!mod, "Expected Failure.\n");
|
||||||
|
|
||||||
|
mod = ASN1_CreateModule(0, 0, 0, 0, encfn, decfn, freefn, size, 0);
|
||||||
|
todo_wine ok(!!mod, "Failed to create module.\n");
|
||||||
|
|
||||||
|
mod = ASN1_CreateModule(ASN1_THIS_VERSION, ASN1_BER_RULE_DER, ASN1FLAGS_NOASSERT, 1, encfn, decfn, freefn, size, name);
|
||||||
|
todo_wine ok(!!mod, "Failed to create module.\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
START_TEST(asn1)
|
||||||
|
{
|
||||||
|
test_CreateModule();
|
||||||
|
}
|
Loading…
Reference in New Issue