File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /* api.c
2+ *
3+ * Copyright (C) 2014-2017 wolfSSL Inc.
4+ *
5+ * This file is part of wolfSSH.
6+ *
7+ * wolfSSH is free software; you can redistribute it and/or modify
8+ * it under the terms of the GNU General Public License as published by
9+ * the Free Software Foundation; either version 3 of the License, or
10+ * (at your option) any later version.
11+ *
12+ * wolfSSH is distributed in the hope that it will be useful,
13+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+ * GNU General Public License for more details.
16+ *
17+ * You should have received a copy of the GNU General Public License
18+ * along with wolfSSH. If not, see <http://www.gnu.org/licenses/>.
19+ */
20+
21+
22+ #include <tests/unit.h>
23+
24+
25+ int ApiTest (void )
26+ {
27+ return 0 ;
28+ }
Original file line number Diff line number Diff line change 55check_PROGRAMS += tests/unit.test
66noinst_PROGRAMS += tests/unit.test
77
8- tests_unit_test_SOURCES = tests/unit.c
8+ tests_unit_test_SOURCES = tests/unit.c tests/api.c
99
1010tests_unit_test_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS)
1111tests_unit_test_LDADD = src/libwolfssh.la $(LIB_STATIC_ADD)
Original file line number Diff line number Diff line change 2323#include <wolfssh/ssh.h>
2424#include <wolfssh/keygen.h>
2525#include <wolfssh/internal.h>
26+ #include <tests/unit.h>
2627
2728
2829/* Utility functions */
@@ -393,6 +394,10 @@ int main(void)
393394 testResult = testResult || unitResult ;
394395#endif
395396
397+ unitResult = ApiTest ();
398+ printf ("API: %s\n" , (unitResult == 0 ? "SUCCESS" : "FAILED" ));
399+ testResult = testResult || unitResult ;
400+
396401 return (testResult ? 1 : 0 );
397402}
398403
Original file line number Diff line number Diff line change 1+ /* unit.h
2+ *
3+ * Copyright (C) 2014-2016 wolfSSL Inc.
4+ *
5+ * This file is part of wolfSSH.
6+ *
7+ * wolfSSH is free software; you can redistribute it and/or modify
8+ * it under the terms of the GNU General Public License as published by
9+ * the Free Software Foundation; either version 3 of the License, or
10+ * (at your option) any later version.
11+ *
12+ * wolfSSH is distributed in the hope that it will be useful,
13+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+ * GNU General Public License for more details.
16+ *
17+ * You should have received a copy of the GNU General Public License
18+ * along with wolfSSH. If not, see <http://www.gnu.org/licenses/>.
19+ */
20+
21+
22+ /*
23+ * The unit module contains the main driver for the wolfSSH unit tests.
24+ */
25+
26+
27+ #pragma once
28+
29+ #ifdef __cplusplus
30+ extern "C" {
31+ #endif
32+
33+ int ApiTest (void );
34+
35+ #ifdef __cplusplus
36+ }
37+ #endif
You can’t perform that action at this time.
0 commit comments