blob: 63c670cbac8db17508df8644229101894d9f042d [file] [log] [blame]
Laurence Lundblade624405d2018-09-18 20:10:47 -07001/*
2 cmd_line_mainc.c -- basic tests for qcbor encoder / decoder
3
4 This is governed by the MIT license.
5
6 Copyright 2018 Laurence Lundblade
7
8 Permission is hereby granted, free of charge, to any person obtaining
9 a copy of this software and associated documentation files (the
10 "Software"), to deal in the Software without restriction, including
11 without limitation the rights to use, copy, modify, merge, publish,
12 distribute, sublicense, and/or sell copies of the Software, and to
13 permit persons to whom the Software is furnished to do so, subject to
14 the following conditions:
15
16 The above copyright notice and this permission notice shall be included
17 in all copies or substantial portions of the Software.
18
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
23 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
24 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26 SOFTWARE.
27 */
Laurence Lundblade74f68412018-09-13 12:18:49 -070028// Created by Laurence Lundblade on 9/13/18.
Laurence Lundblade74f68412018-09-13 12:18:49 -070029
30#include <stdio.h>
31
Laurence Lundblade781fd822018-10-01 09:37:52 -070032#include "run_tests.h"
Laurence Lundblade74f68412018-09-13 12:18:49 -070033
Laurence Lundbladea954db92018-09-28 19:27:31 -070034
Laurence Lundbladecc2ed342018-09-22 17:29:55 -070035int fputs_wrapper(const char *szString, void *ctx)
36{
37 return fputs(szString, (FILE *)ctx);
38}
Laurence Lundblade2300b562018-09-29 20:00:09 -070039
Laurence Lundblade2300b562018-09-29 20:00:09 -070040
Laurence Lundblade68a13352018-09-23 02:19:54 -070041int main(int argc, const char * argv[]) {
42
Laurence Lundbladecc2ed342018-09-22 17:29:55 -070043 int nNumTestsFailed = run_tests(&fputs_wrapper, stdout, NULL);
44
45 return nNumTestsFailed;
Laurence Lundblade74f68412018-09-13 12:18:49 -070046}