Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
internal/assert/types.h
Go to the documentation of this file.
1/*
2 * The MIT License (MIT)
3 *
4 * Copyright © 2016 Franklin "Snaipe" Mathieu <http://snai.pe/>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24#ifndef CRITERION_INTERNAL_ASSERT_TYPES_H_
25#define CRITERION_INTERNAL_ASSERT_TYPES_H_
26
31
32#define CRI_ASSERT_MAX_PARAMS 4
33
35 const char *name;
36 void *data;
38};
39
41 const char *repr;
42 const char *message;
44
45 unsigned pass : 1;
46 unsigned dynrepr : 1;
47 uint32_t nchild : 30;
48 uint32_t maxchild;
50};
51
53
56 struct cri_assert_node *node);
59CR_API void cri_assert_node_send(const char *file, size_t line, struct cri_assert_node *tree);
60CR_API char *cri_assert_message(const char *fmt, ...);
61CR_API void *cri_assert_mkbytes(size_t size, const void *bytes);
62
64
65#endif /* !CRITERION_INTERNAL_ASSERT_TYPES_H_ */
#define CR_BEGIN_C_API
Definition common.h:54
#define CR_API
Definition common.h:128
#define CR_END_C_API
Definition common.h:55
CR_BEGIN_C_API CR_API void cri_assert_node_init(struct cri_assert_node *node)
CR_API void cri_assert_node_term(struct cri_assert_node *tree)
CR_API void cri_assert_node_negate(struct cri_assert_node *tree)
CR_API struct cri_assert_node * cri_assert_node_add(struct cri_assert_node *tree, struct cri_assert_node *node)
cri_assert_result_type
@ CRI_ASSERT_RT_STR
@ CRI_ASSERT_RT_RAW
#define CRI_ASSERT_MAX_PARAMS
CR_API void * cri_assert_mkbytes(size_t size, const void *bytes)
CR_API char * cri_assert_message(const char *fmt,...)
CR_API void cri_assert_node_send(const char *file, size_t line, struct cri_assert_node *tree)
struct cri_assert_node * children
struct cri_assert_param params[CRI_ASSERT_MAX_PARAMS]
enum cri_assert_result_type type