mirror of https://github.com/wolfSSL/wolfssh.git
add stub for the API test
parent
efeb9a41b2
commit
c3d0c895d2
|
@ -0,0 +1,28 @@
|
||||||
|
/* api.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2014-2017 wolfSSL Inc.
|
||||||
|
*
|
||||||
|
* This file is part of wolfSSH.
|
||||||
|
*
|
||||||
|
* wolfSSH is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* wolfSSH 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 General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with wolfSSH. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <tests/unit.h>
|
||||||
|
|
||||||
|
|
||||||
|
int ApiTest(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -5,7 +5,7 @@
|
||||||
check_PROGRAMS += tests/unit.test
|
check_PROGRAMS += tests/unit.test
|
||||||
noinst_PROGRAMS += tests/unit.test
|
noinst_PROGRAMS += tests/unit.test
|
||||||
|
|
||||||
tests_unit_test_SOURCES = tests/unit.c
|
tests_unit_test_SOURCES = tests/unit.c tests/api.c
|
||||||
|
|
||||||
tests_unit_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS)
|
tests_unit_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS)
|
||||||
tests_unit_test_LDADD = src/libwolfssh.la $(LIB_STATIC_ADD)
|
tests_unit_test_LDADD = src/libwolfssh.la $(LIB_STATIC_ADD)
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <wolfssh/ssh.h>
|
#include <wolfssh/ssh.h>
|
||||||
#include <wolfssh/keygen.h>
|
#include <wolfssh/keygen.h>
|
||||||
#include <wolfssh/internal.h>
|
#include <wolfssh/internal.h>
|
||||||
|
#include <tests/unit.h>
|
||||||
|
|
||||||
|
|
||||||
/* Utility functions */
|
/* Utility functions */
|
||||||
|
@ -393,6 +394,10 @@ int main(void)
|
||||||
testResult = testResult || unitResult;
|
testResult = testResult || unitResult;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
unitResult = ApiTest();
|
||||||
|
printf("API: %s\n", (unitResult == 0 ? "SUCCESS" : "FAILED"));
|
||||||
|
testResult = testResult || unitResult;
|
||||||
|
|
||||||
return (testResult ? 1 : 0);
|
return (testResult ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
/* unit.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2014-2016 wolfSSL Inc.
|
||||||
|
*
|
||||||
|
* This file is part of wolfSSH.
|
||||||
|
*
|
||||||
|
* wolfSSH is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* wolfSSH 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 General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with wolfSSH. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The unit module contains the main driver for the wolfSSH unit tests.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int ApiTest(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
Loading…
Reference in New Issue