Changeset 134ac5d in mainline for uspace/lib/pcut/src/internal.h


Ignore:
Timestamp:
2014-06-06T07:54:24Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8db09e4
Parents:
eeb23f2d
Message:

Update PCUT to newest version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/pcut/src/internal.h

    reeb23f2d r134ac5d  
    2727 */
    2828
     29/** @file
     30 * Common definitions internally used in PCUT.
     31 */
     32
    2933#ifndef PCUT_INTERNAL_H_GUARD
    3034#define PCUT_INTERNAL_H_GUARD
    3135
    32 #include <pcut/test.h>
     36#include <pcut/pcut.h>
    3337#include <stdlib.h>
    3438
     
    6973pcut_item_t *pcut_get_real_next(pcut_item_t *item);
    7074pcut_item_t *pcut_get_real(pcut_item_t *item);
    71 const char* pcut_run_test(pcut_test_func_t function);
    72 const char* pcut_run_setup_teardown(pcut_setup_func_t function);
    7375void pcut_print_tests(pcut_item_t *first);
    7476int pcut_is_arg_with_number(const char *arg, const char *opt, int *value);
     
    7880int pcut_run_test_single(pcut_item_t *test);
    7981
    80 extern pcut_item_t *pcut_current_test;
    81 extern pcut_item_t *pcut_current_suite;
    82 extern int pcut_running_test_now;
    83 extern int pcut_running_setup_now;
     82int pcut_get_test_timeout(pcut_item_t *test);
    8483
     84void pcut_failed_assertion(const char *message);
    8585void pcut_print_fail_message(const char *msg);
    8686
     87/** Reporting callbacks structure. */
    8788typedef struct pcut_report_ops pcut_report_ops_t;
    88 /** Reporting callbacks structure. */
     89
     90/** @copydoc pcut_report_ops_t */
    8991struct pcut_report_ops {
    9092        /** Initialize the reporting, given all tests. */
     
    116118void pcut_report_done(void);
    117119
     120/* OS-dependent functions. */
    118121
     122/** Tell whether two strings start with the same prefix.
     123 *
     124 * @param a First string.
     125 * @param b Second string.
     126 * @param len Length of common prefix.
     127 * @return Whether first @p len characters of @p a are the same as in @p b.
     128 */
    119129int pcut_str_start_equals(const char *a, const char *b, int len);
     130
     131/** Get size of string in bytes.
     132 *
     133 * @param s String in question.
     134 * @return Size of @p s in bytes.
     135 */
    120136int pcut_str_size(const char *s);
     137
     138/** Convert string to integer.
     139 *
     140 * @param s String with integer.
     141 * @return Converted integer.
     142 */
    121143int pcut_str_to_int(const char *s);
     144
     145/** Find character in a string.
     146 *
     147 * @param haystack Where to look for the @p needle.
     148 * @param needle Character to find.
     149 * @return String starting with @p needle.
     150 * @retval NULL there is no @p needle in @p haystack.
     151 */
    122152char *pcut_str_find_char(const char *haystack, const char needle);
    123153
Note: See TracChangeset for help on using the changeset viewer.