/
githubmirror
/
libcbor
Обзор
Документация
Войти
/
githubmirror
/
libcbor
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v0.2.0
test/assertions.c
21 строка
607 B
PJK
Add license notice
27 апр 2015, 22:17
27 апр 2015, 22:17
97f0323
Код
Авторство
О чём код?
/* * Copyright (c) 2014-2015 Pavel Kalvoda <me@pavelkalvoda.com> * * libcbor is free software; you can redistribute it and/or modify * it under the terms of the MIT license. See LICENSE for details. */ #include "assertions.h" void assert_uint8(cbor_item_t * item, uint8_t num) { assert_true(cbor_isa_uint(item)); assert_true(cbor_int_get_width(item) == CBOR_INT_8); assert_true(cbor_get_uint8(item) == num); } void assert_decoder_result(size_t read, enum cbor_decoder_status status, struct cbor_decoder_result result) { assert_true(read == result.read); assert_true(status == result.status); }